On Fri, Apr 17 2015, Mathieu Desnoyers wrote:
> + */
> +SYSCALL_DEFINE2(membarrier, int, cmd, int, flags)
> +{
> + switch (cmd) {
> + case MEMBARRIER_CMD_QUERY:
> + return MEMBARRIER_CMD_BITMASK;
> + case MEMBARRIER_CMD_SHARED:
> + if (num_online_cpus() > 1)
>
On Mon, Apr 20 2015, Borislav Petkov wrote:
> On Mon, Apr 20, 2015 at 10:24:44PM +0200, Rasmus Villemoes wrote:
>> Hadn't seen that, so I wrongly assumed everybody had forgotten about
>> it. I don't care about the S-o-b on the trivial Makefile patch, but my
>> req
On Thu, Apr 23 2015, Borislav Petkov wrote:
> On Thu, Apr 23, 2015 at 01:00:26PM +0200, Rasmus Villemoes wrote:
>> > or you want attribution or ...?
>>
>> That would be nice.
>
> I fail to see for what - I see H.J. Lu's patch from Dec. 2014 and you
> rep
On Sun, Mar 29 2015, Mike Snitzer wrote:
> On Tue, Dec 9, 2014 at 4:03 PM, Rasmus Villemoes
> wrote:
>> Return the mathematically correct answer when an argument is 0.
>>
>> Signed-off-by: Rasmus Villemoes
>
> This change is the source of 3.19 regression for
The creators of the C language gave us the while keyword. Let's use
that instead of synthesizing it from if+goto.
Made possible by 6597d783397a ("mm/mmap.c: replace find_vma_prepare()
with clearer find_vma_links()").
Signed-off-by: Rasmus Villemoes
---
mm/mmap.c | 8 ++--
1
nline, so let's add type checking and get rid of the ghost
reference.
Signed-off-by: Rasmus Villemoes
---
include/linux/cpumask.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 086549a665e2..972c30e0714e
On Mon, Mar 30 2015, Andrew Morton wrote:
> On Mon, 30 Mar 2015 23:54:13 +0300 "Kirill A. Shutemov"
> wrote:
>
>> On Mon, Mar 30, 2015 at 09:40:35PM +0200, Rasmus Villemoes wrote:
>> > The creators of the C language gave us the while keyword. Let's use
&g
tty)
...+>
allmodconfig compiles, so I'm fairly confident the stack buffers
weren't used for other purposes as well.
Signed-off-by: Rasmus Villemoes
---
drivers/input/serio/serport.c| 5 ++---
drivers/tty/amiserial.c | 8 ++--
drivers/tty/cyclades.c | 8 +
r*.
While at it, we can also constify the tty parameter.
Signed-off-by: Rasmus Villemoes
---
drivers/tty/tty_io.c | 2 +-
include/linux/tty.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 2bb4dfc02873..5d4a9fd7510a 100644
All users of tty_name pass the return value directly to a printf
function, so we might as well use tty->name directly instead of
copying it to a user-supplied (stack) buffer.
allmodconfig compile-tested only.
Rasmus Villemoes (3):
tty: constify return type of tty_name
tty: return tty-&g
All users of tty_name pass the return value (the provided buffer) to
some printf-like function. We can thus avoid the strcpy and, more
importantly, later remove the buf parameter completely, eliminating
the need for some 64 byte stack buffers.
Signed-off-by: Rasmus Villemoes
---
drivers/tty
The tty_name member of struct ser_device is never set or used, so it
can be removed. (The definition of struct ser_device is private to
this .c file, and the identifier tty_name only occurs in this one
place.)
Signed-off-by: Rasmus Villemoes
---
drivers/net/caif/caif_serial.c | 1 -
1 file
On Wed, Apr 01 2015, Sasha Levin wrote:
> Rather than calling free_hot_cold_page() for every page, batch them up in a
> list and pass them on to free_hot_cold_page_list(). This will let us defer
> them to a workqueue.
>
> Signed-off-by: Sasha Levin
> ---
> mm/page_alloc.c |6 +-
> 1 fil
On Fri, Apr 24 2015, Andreas Gruenbacher wrote:
> There is a hole in struct posix_acl because its struct rcu_head member is too
> large; at least on on 64-bit architectures, the hole cannot be closed by
> changing the definition of struct posix_acl. So instead, remove the struct
> rcu_head member
On Mon, Apr 27 2015, Daniel Wagner wrote:
> static int cmp_32(const void *a, const void *b)
> {
> return (int) (*(u32 *)a - *(u32 *)b);
> }
>
> static int cmp_64(const void *a, const void *b)
> {
> return (int) (*(u64 *)a - *(u64 *)b);
> }
>
Please [1] don't [2] do [3] this [4].
[1]
defconfig kernel, the .text saving is around 26 kB:
$ size /tmp/vmlinux.{old,new}
textdata bss dec hex filename
122218501735352 1077248 15034450 e56852 /tmp/vmlinux.old
121959551735352 1077248 15008555 e5032b /tmp/vmlinux.new
Signed-off-by: Rasmus
On Mon, Apr 20 2015, Borislav Petkov wrote:
> On Mon, Apr 20, 2015 at 02:28:16PM +0200, Rasmus Villemoes wrote:
>>
>> Nothing seems to have happened on the kernel side since H.J. Lu
>> implemented this in December. Since gcc 5 is officially released
>
> I see the s
ed. Even if the kernel followed C99 to the letter, I don't think
that would be particularly useful in these cases. For consistency with
most other format strings in the file, use an explicit precision of 16
and add a 0x prefix.
Signed-off-by: Rasmus Villemoes
---
v3: same as v2, just re
On Sat, Mar 21 2015, Rasmus Villemoes wrote:
> With CONFIG_DEBUG_INFO_REDUCED, we do get quite a lot of debug info
> (around 22.7 MB for a defconfig+DEBUG_INFO_REDUCED). However, the
> "basenames must match" rule used by -femit-struct-debug-baseonly
> option means that
nopl (%rax)
Signed-off-by: Rasmus Villemoes
---
If this is worth applying, one could consider giving dentry_hashtable,
inode_hashtable and their friends the same treatment. The variables
are all __read_mostly, but may still end up in separate cache lines
(even if the linker places them
05 84 61 e4 00add0xe46184(%rip),%rax#
81eff9f0 <__futex_data>
+: 48 03 05 8c 61 e4 00add0xe4618c(%rip),%rax#
81eff9f0 <__futex_data>
: c3 retq
Not-signed-off-by: Rasmus Villemoes
---
kernel/futex.c | 11 ++-
On Mon, Jun 22 2015, Peter Zijlstra wrote:
> On Mon, Jun 22, 2015 at 03:16:18PM +0200, Rasmus Villemoes wrote:
>> +static struct {
>> +struct futex_hash_bucket *queues;
>> +unsigned longhashsize;
>> +} __futex_data __read_mostly __aligned(16);
On Tue, Jun 23 2015, Michal Marek wrote:
>
> EXTRA_CFLAGS is reserved for use by Makefiles, please use KCFLAGS
> instead.
Will do, thanks. Maybe Documentation/SubmitChecklist and
Documentation/development-process/4.Coding wants to be updated.
> I wonder whether it worked at all, because EXTRA_C
Ignore the *.su files generated by using the gcc option -fstack-usage.
Signed-off-by: Rasmus Villemoes
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 4ad4a98b884b..9e51ead66a55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7
5.0 doesn't
have this problem; it uses the full name as seen in the object file.
[1] Since gcc encodes that by
48 83 c4 80 add$0xff80,%rsp
and not
48 81 ec 80 00 00 00 sub $0x80,%rsp
since -128 fits in an imm8.
Signed-off-by: Rasmus Villemoes
---
scri
Make sure 'make clean' removes *.su files generated by the gcc option
-fstack-usage.
Signed-off-by: Rasmus Villemoes
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 6c6f14628f32..81f1d74848cc 100644
--- a/Makefile
+++ b/Makefile
@@ -1429
,new}.su | sort -k5,5g
shows that gcc 5.0 generally produces less stack-hungry code than gcc
4.7. Obviously, the script can also be used for measuring the effect
of commits, .config tweaks or whatnot.
Signed-off-by: Rasmus Villemoes
---
scripts/stackdelta | 59
This eliminates a little .text and avoids repeating the strchr call
when we meet a '!' (which will happen at least once).
Signed-off-by: Rasmus Villemoes
---
v2: Avoid ugly (char *) cast.
drivers/base/core.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git
There's no point in starting over every time we see a ','...
Signed-off-by: Rasmus Villemoes
Acked-by: Steven Rostedt
---
v2: same patch, added Ack.
kernel/trace/trace_events_filter.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace_
There's no point in starting over when we meet a '/'. This also
eliminates a stack variable and a little .text.
Signed-off-by: Rasmus Villemoes
---
v2: no changes.
drivers/md/md.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/md/md.c b/driver
In one case, we eliminate a local variable; in the other a strlen()
call and some .text.
Signed-off-by: Rasmus Villemoes
---
v2: no changes.
fs/jbd2/journal.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index b96bd8076b70
This makes a very large function a little smaller.
Signed-off-by: Rasmus Villemoes
---
v2: no changes.
fs/ext4/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index ca9d4a2fed41..5f3c43a66937 100644
--- a/fs/ext4/super.c
+++ b/fs
There's probably not many slashes in the name, but starting over when
we see one feels wrong.
Signed-off-by: Rasmus Villemoes
---
v2: Original code relied on the const laundering done by strchr; v1
had a corresponding explicit (char*) cast. Avoid this altogether.
lib/kobject.c
al strlen() call and then the open-coded loop.
Let's simply use strreplace() instead.
Signed-off-by: Rasmus Villemoes
Acked-by: Steven Rostedt
---
v2: same patch, added Ack.
kernel/trace/blktrace.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/tra
he caller to avoid a strlen call).
Signed-off-by: Rasmus Villemoes
---
v2: spello fixed, parameters renamed 'old' and 'new' (just so the
kernel doc aligns nicely, and because that's what python -c
'help(str.replace)' uses). Still EXPORT_SYMBOL, not inline (tried it,
what the easiest path is for the remaining patches.
Rasmus Villemoes (8):
lib: string: Introduce strreplace
kernel/trace/trace_events_filter.c: Use strreplace
blktrace: use strreplace in do_blk_trace_setup
lib/kobject.c: Use strreplace
drivers/base/core.c: Use strreplace
drivers/md/md.c
On Tue, Jun 02 2015, Petr Mladek wrote:
> I sent a patch that helped me a lot with parsing.
FWIW, me too. I've always been bothered by the empty line between the
statistics line and the summary, and the lack of vertical separation
before the output for the next file.
Rasmus
--
To unsubscribe fr
Commit 43239cbe79fc ("kernel: Change ASSIGN_ONCE(val, x) to
WRITE_ONCE(x, val)") left behind this reference.
Signed-off-by: Rasmus Villemoes
---
include/linux/compiler.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/compiler.h b/include/linux/compil
Currently, two of the branches are dead code, since an earlier smaller
substring would have been found ("TP" in the "TP_NW" case and either
of "BNC" and "AUI" in the "BNC_AUI" case). Rearrange the strstr()
calls so that the longer strings are se
to w->name.
Signed-off-by: Rasmus Villemoes
---
sound/soc/intel/atom/sst-atom-controls.c | 20
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/sound/soc/intel/atom/sst-atom-controls.c
b/sound/soc/intel/atom/sst-atom-controls.c
index 90aa5c0476f3..16670f
al strlen() call and then the open-coded loop.
Let's simply use strreplace() instead.
Signed-off-by: Rasmus Villemoes
---
kernel/trace/blktrace.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 483cecf
In one case, we eliminate a local variable; in the other a strlen()
call and some .text.
Signed-off-by: Rasmus Villemoes
---
fs/jbd2/journal.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index b96bd8076b70..5c187ded12d6
This makes a very large function a little smaller.
Signed-off-by: Rasmus Villemoes
---
fs/ext4/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index ca9d4a2fed41..5f3c43a66937 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
Doing single-character substitution on an entire string is open-coded
in a few places, sometimes in a rather suboptimal way. This introduces
a trivial helper, strreplace, for this task along with a few example
conversions.
Rasmus Villemoes (8):
lib: string: Introduce strreplace
kernel/trace
There's probably not many slashes in kobj->name, but starting over
when we see one feels wrong.
Signed-off-by: Rasmus Villemoes
---
lib/kobject.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/kobject.c b/lib/kobject.c
index 3b841b97fccd..597d962d3d4d 1006
There's no point in starting over when we meet a '/'. This also
eliminates a stack variable and a little .text.
Signed-off-by: Rasmus Villemoes
---
drivers/md/md.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
ind
This eliminates a local variable and a little .text.
Signed-off-by: Rasmus Villemoes
---
drivers/base/core.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 21d13038534e..01f2c1214f06 100644
--- a/drivers/base/core.c
+++ b
he caller to avoid a strlen call).
Signed-off-by: Rasmus Villemoes
---
include/linux/string.h | 1 +
lib/string.c | 17 +
2 files changed, 18 insertions(+)
diff --git a/include/linux/string.h b/include/linux/string.h
index e40099e585c9..4f09e41c7169 100644
--- a/include/
There's no point in starting over every time we see a ','...
Signed-off-by: Rasmus Villemoes
---
kernel/trace/trace_events_filter.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace_events_filter.c
b/kernel/trace/trace_events
On Tue, Jun 09 2015, Joe Perches wrote:
> On Tue, 2015-06-09 at 01:26 +0200, Rasmus Villemoes wrote:
>> Strings are sometimes sanitized by replacing a certain character
>> (often '/') by another (often '!').
> []
>> v2: spello fixed, parameters rename
On Tue, Jun 09 2015, Theodore Ts'o wrote:
> On Tue, Jun 09, 2015 at 01:26:48AM +0200, Rasmus Villemoes wrote:
>> Doing single-character substitution on an entire string is open-coded
>> in a few places, sometimes in a rather suboptimal way. This introduces
>> a trivi
gcc is not smart enough to realize that strlen(strbuf1) cannot be
changed by the loop body, so it is forced to recompute it, at least in
the branch containing the assignment. Avoid this by using an
equivalent stopping condition.
Signed-off-by: Rasmus Villemoes
---
drivers/video/fbdev/sis
Just six days after this FIXME was added seven years ago, Sam Ravnborg
added the missing feature (37c514e3dfc8 "Add missing init section
definitions"), though it ended up being called __initconst.
Let's use it; better late than never.
Signed-off-by: Rasmus Villemoes
---
dri
Hi Dan
You were last to touch drivers/isdn/pcbit/drv.c (7bcc6738eef), but I
think there may still be an off-by-one in pcbit_set_msn: At the end of
the loop, sp is incremented by len, but if the string contained a comma,
sp will now point at that. At that point, we seem to be stuck in an
infinite l
Making a function call with 20 arguments is rather expensive in both
stack and .text. In this case, doing the formatting manually doesn't
make it any less readable, so we might as well save 155 bytes of .text
and 112 bytes of stack.
Signed-off-by: Rasmus Villemoes
---
fs/ext4/mballoc.
[adding some emails I should Cc'ed in the first place]
On Thu, Jun 11 2015, Dan Carpenter wrote:
> On Wed, Jun 10, 2015 at 09:50:53PM +0200, Rasmus Villemoes wrote:
>> Hi Dan
>>
>> You were last to touch drivers/isdn/pcbit/drv.c (7bcc6738eef), but I
>> think the
On Thu, May 07 2015, Rasmus Villemoes wrote:
> The four cpumasks cpu_{possible,online,present,active}_bits are
> exposed readonly via the corresponding const variables
> cpu_xyz_mask. But they are also accessible for arbitrary writing via
> the exposed functions set_cpu_xyz. There
Whatever the "historical reasons" were back around 1996 when this
comment was added,
git grep -E '\b_(S?SIZE|TIME|CLOCK|PTRDIFF|CADDR)_T\b'
seems to say that they are no longer relevant. Relieve the
preprocessor from a little work.
Signed-off-by: Rasmus Villemoes
---
i
A precision of 16 (%.16llx) has the same effect as a field width of 16
along with passing the 0 flag (%016llx), but the latter is much more
common in the kernel tree. Update cxl to use that.
Signed-off-by: Rasmus Villemoes
---
So, maybe this on top?
drivers/misc/cxl/irq.c| 32
Ignore the *.su files generated by using the gcc option -fstack-usage.
Signed-off-by: Rasmus Villemoes
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 4ad4a98b884b..9e51ead66a55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7
at by
48 83 c4 80 add$0xff80,%rsp
and not
48 81 ec 80 00 00 00sub$0x80,%rsp
since -128 fits in an imm8.
Signed-off-by: Rasmus Villemoes
---
scripts/stackusage | 40
1 file changed, 40 insertions(+)
create mode 100755
/{old,new}.su | sort -k5,5g
shows that gcc 5.0 generally produces less stack-hungry code than gcc
4.7. Obviously, the script can also be used for measuring the effect
of commits, .config tweaks or whatnot.
Signed-off-by: Rasmus Villemoes
---
scripts/stackdelta | 55
Make sure 'make clean' removes *.su files generated by the gcc option
-fstack-usage.
Signed-off-by: Rasmus Villemoes
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 40a8b068ac26..5cd04968d914 100644
--- a/Makefile
+++ b/Makefile
@@ -1430
On Sun, Jun 21 2015, Rasmus Villemoes wrote:
> +
> +my $old = read_stack_usage_file($ARGV[0]);
> +my $new = read_stack_usage_file($ARGV[1]);
> +my @common = grep {exists $new->{$_}} keys %$old;
> +print join(",", keys %old) . "\n";
Bah, that print is leftov
user-mode-linux-de...@lists.sourceforge.net
Signed-off-by: Rasmus Villemoes
---
scripts/basic/fixdep.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index fa3d39b6f23b..d7fbe545dd5d 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/
...) lines from the .o.cmd files.
Signed-off-by: Rasmus Villemoes
---
scripts/basic/fixdep.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index d7fbe545dd5d..1b21870d6e7f 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
/booger.h - we could change
that to FOO if we care
[2] https://lkml.org/lkml/2018/2/22/838
Cc: Linus Torvalds
Signed-off-by: Rasmus Villemoes
---
scripts/basic/fixdep.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 1b21870d6e7f..449b68c4c90c
nter to
strncpy_from_user. Instead of explicit padding, simply swap the refcnt
and aname members, as suggested by Al Viro.
Signed-off-by: Rasmus Villemoes
---
fs/namei.c | 2 ++
include/linux/fs.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/namei.c b/fs/n
inux/kernel/git/tglx/history.git/commit/?id=c1c48e61c251f57e7a3f1bf11b3c462b2de9dcb5
Signed-off-by: Rasmus Villemoes
---
drivers/char/random.c | 53 ---
1 file changed, 25 insertions(+), 28 deletions(-)
diff --git a/drivers/char/random.c b/drivers
Simplify the code slightly by having seq_open_data do the ->private
assignment.
Signed-off-by: Rasmus Villemoes
---
drivers/pci/host/pci-tegra.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
in
There are quite a few callers of seq_open that could be simplified by
setting the ->private member via the seq_open call instead of fetching
file->private_data afterwards.
Signed-off-by: Rasmus Villemoes
---
I've just included a few examples of possible users of this helper,
there ar
This code should check the return value of seq_open(); if it failed,
file->private_data is NULL. But we can avoid the issue entirely and
simplify the code by letting seq_open_data() set the ->private member
to objbuf.
Signed-off-by: Rasmus Villemoes
---
arch/ia64/sn/kernel/sn2/sn_hwperf
Simplify the code slightly by having seq_open_data do the ->private assignment.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c
This code should check the return value of seq_open(); if it failed,
file->private_data is NULL. But we can avoid the issue entirely and
simplify the code by letting seq_open_data() set the ->private member.
Signed-off-by: Rasmus Villemoes
---
arch/powerpc/platforms/pseries/hvCall_inst
On 2018-03-28 20:18, Laura Abbott wrote:
> The new challenge is to remove VLAs from the kernel
> (see https://lkml.org/lkml/2018/3/7/621) to eventually
> turn on -Wvla.
>
> Using a kmalloc array is the easy way to fix this but kmalloc is still
> more expensive than stack allocation. Introduce a fa
On 2018-04-05 03:45, Andrew Morton wrote:
> On Wed, 4 Apr 2018 18:25:16 -0700 Randy Dunlap wrote:
>
>> From: Randy Dunlap
>>
>> If the reiserfs mount option's journal name contains a '%' character,
>> it can lead to a WARN_ONCE() in lib/vsprintf.c::format_decode(),
>> saying: "Please remove unsu
On 2018-04-04 10:58, Petr Mladek wrote:
> We are going to check the address using probe_kernel_address(). It will
> be more expensive and it does not make sense for well known address.
>
> This patch splits the string() function. The variant without the check
> is then used on locations that handl
On 2018-04-04 10:58, Petr Mladek wrote:
> There are few printk formats that make sense only with two or more
> specifiers. Also some specifiers make sense only when a kernel feature
> is enabled.
>
> The handling of unknown specifiers is strange, inconsistent, and
> even leaking the address. For e
On 2018-04-04 10:58, Petr Mladek wrote:
> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
> index 3551b7957d9e..1a080a75a825 100644
> --- a/lib/vsprintf.c
> +++ b/lib/vsprintf.c
> @@ -599,12 +599,46 @@ char *__string(char *buf, char *end, const char *s,
> struct printf_spec spec)
> return wide
On 2018-04-30 22:16, Matthew Wilcox wrote:
> On Mon, Apr 30, 2018 at 12:02:14PM -0700, Kees Cook wrote:
>>
>> Getting the constant ordering right could be part of the macro
>> definition, maybe? i.e.:
>>
>> static inline void *kmalloc_ab(size_t a, size_t b, gfp_t flags)
>> {
>> if (__builtin_co
On 2018-04-25 13:12, Petr Mladek wrote:
>
> diff --git a/lib/test_printf.c b/lib/test_printf.c
> index 45c33143fb4a..74dff6c44ec6 100644
> --- a/lib/test_printf.c
> +++ b/lib/test_printf.c
> @@ -285,12 +285,19 @@ null_pointer(void)
>
> #define PTR_INVALID ((void *)0x00ab)
>
> +extern in
On 28/02/2019 08.14, Qiang Zhao wrote:
> On Tue, Feb 26, 2019 at 2:49 AM Rasmus Villemoes
> wrote:
>> -Original Message-----
>> From: Rasmus Villemoes
>> Sent: 2019年2月26日 16:48
>> To: Qiang Zhao ; Leo Li
>> Cc: linux-kernel@vger.kernel.org; Valentin L
the snums array.
This should make it easier to support all of the QE variants out
there, instead of teaching the qe driver some magic mapping from
qe-num-snums to actual snum values.
Rasmus Villemoes (4):
soc/fsl/qe: qe.c: drop useless static qualifier
soc/fsl/qe: qe.c: reduce static memory
The local variable snum_init has no reason to have static storage duration.
Signed-off-by: Rasmus Villemoes
---
drivers/soc/fsl/qe/qe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c
index 2ef6fc6487c1..4b6aa6b3b685 100644
The 'try of_find_compatible_node(NULL, NULL, "fsl,qe"), fall back to
of_find_node_by_type(NULL, "qe")' pattern is repeated five
times. Factor it into a common helper.
Signed-off-by: Rasmus Villemoes
---
drivers/soc/fsl/qe/qe.c | 71 +--
acked in a 32 byte bitmap.
So this reduces the .data footprint by 1760 bytes. It also serves as
preparation for introducing another DT binding for specifying the snum
values.
Signed-off-by: Rasmus Villemoes
---
drivers/soc/fsl/qe/qe.c | 37 -
1 file change
<
0x88 0x89 0x98 0x99 0xa8 0xa9 0xb8 0xb9
0xc8 0xc9 0xd8 0xd9 0xe8 0xe9>;
Signed-off-by: Rasmus Villemoes
---
.../devicetree/bindings/soc/fsl/cpm_qe/qe.txt | 8 +++-
drivers/soc/fsl/qe/qe.c| 14 +-
2
On 01/03/2019 04.36, Qiang Zhao wrote:
> On 2019年2月28日 18:31,Rasmus Villemoes wrote:
>
>> -Original Message-----
>> From: Rasmus Villemoes
>> Sent: 2019年2月28日 18:31
>> To: Qiang Zhao ; Leo Li
>> Cc: Scott Wood ; linux-kernel@vger.kernel.org; Timur Ta
On 01/03/2019 10.43, Qiang Zhao wrote:
> On 01/03/2019 15.50,Rasmus Villemoes wrote:
>> -Original Message-
>> From: Rasmus Villemoes
>> Sent: 2019年3月1日 15:50
>> To: Qiang Zhao ; Leo Li
>> Cc: Scott Wood ; linux-kernel@vger.kernel.org; Timur Tabi
>
attempt to copy 4GB from snum_init_46[] to the snum[]
array.
So fold the handling of the legacy fsl,qe-num-snums into
qe_snums_init, and make sure we do not end up using the snum_init_46
array in cases other than the two where we know it makes sense.
Signed-off-by: Rasmus Villemoes
---
Qiang: Some
The out_unlock label is misleading; no unlocking happens after it, so
just return NULL directly. Also, nothing between the
kmem_cache_zalloc() that creates new and the two key_put() can
initialize new->uid_keyring or new->session_keyring, so those calls
are no-ops.
Signed-off-by: Rasmus Vil
r.
Signed-off-by: Rasmus Villemoes
---
include/linux/mod_devicetable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 448621c32e4d..502629bdac2e 100644
--- a/include/linux/mod_devicetable.h
+++ b/inc
ticed that
the cmp callback I was removing was actually buggy, so I went back and
added a patch in front suitable for -stable. I'll leave it to others
to decide if it's important enough for that.
Please note that this is only compile-tested.
Rasmus Villemoes (4):
irqchip/gic-v3-its:
it's probably not worth complicating the code for
that.
Signed-off-by: Rasmus Villemoes
---
drivers/irqchip/irq-gic-v3-its.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 75
There's no reason to ask kmalloc() to zero the allocation, since all
the fields get initialized immediately afterwards. Except that there's
also not any reason to initialize the ->entry member, since the
element gets added to the lpi_range_list immediately.
Signed-off-by: Ras
that only the just-inserted element may be
merged with its neighbours.
Signed-off-by: Rasmus Villemoes
---
drivers/irqchip/irq-gic-v3-its.c | 61
1 file changed, 31 insertions(+), 30 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq
ce versa, of course.
Fixes: 880cb3cddd16 (irqchip/gic-v3-its: Refactor LPI allocator)
Cc: sta...@vger.kernel.org (v4.19+)
Signed-off-by: Rasmus Villemoes
---
drivers/irqchip/irq-gic-v3-its.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers
On 12/03/2019 22.52, Nathan Chancellor wrote:
> After LLVM revision r355672 [1], all known working kernel configurations
> fail to link [2]:
>
> ld: init/do_mounts.o: in function `prepare_namespace':
> do_mounts.c:(.init.text+0x5ca): undefined reference to `bcmp'
> ld: do_mounts.c:(.init.text+0x5e
On 13/03/2019 20.01, Steven Rostedt wrote:
> On Wed, 13 Mar 2019 11:51:09 -0700
> Nick Desaulniers wrote:
>
>>>
>>> or have a better comment explaining why its the same.
>>
>> I could add something about "the signedness of the return code not
>> providing any meaning." What would you like to s
The various sysfs files used to configure a netdev-triggered LED are
already documented, but let's also add "netdev" to the list of things
one can reasonably set linux,default-trigger to.
Signed-off-by: Rasmus Villemoes
---
Documentation/devicetree/bindings/leds/common.txt
401 - 500 of 1998 matches
Mail list logo