If CONFIG_DYNAMIC_DEBUG is not set, acpi_handle_debug directly invokes
acpi_handle_printk (if DEBUG) or does a no-printk (if !DEBUG). So this
macro is never used.
Cc: linux-a...@vger.kernel.org
Acked-by: Jason Baron
Acked-by: Rafael J. Wysocki
Signed-off-by: Rasmus Villemoes
---
include/linux
as long as the struct ddebug_table, since
free_module() calls ddebug_remove_module().
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
lib/dynamic_debug.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index c7
For symmetry with ddebug_remove_module, and to avoid a bit of ifdeffery
in module.c, move the declaration of ddebug_add_module inside #if
defined(CONFIG_DYNAMIC_DEBUG) and add a corresponding no-op stub in the
#else branch.
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include
ifier.
To prevent such a problem from going unnoticed, we use a guard symbol in
assembly whose value is unique per DEFINE_DYNAMIC_DEBUG_METADATA
invocation.
Cc: x...@kernel.org
Cc: Ingo Molnar
Cc: Jason Baron
Signed-off-by: Rasmus Villemoes
---
arch/x86/Kconfig | 1 +
arc
These will be useful when defining the contents of (a struct containing)
a static key in assembly.
Cc: x...@kernel.org
Cc: Ingo Molnar
Cc: Jason Baron
Signed-off-by: Rasmus Villemoes
---
arch/x86/include/asm/jump_label.h | 17 +
1 file changed, 17 insertions(+)
diff --git a
suitable DEFINE_DYNAMIC_DEBUG_METADATA macro in
.
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/dynamic_debug.h | 14 ++
lib/Kconfig.debug | 3 +++
lib/dynamic_debug.c | 20
3 files changed, 37 insertions(+)
diff
When we introduce compact versions of these pointers (a la
CONFIG_GENERIC_BUG_RELATIVE_POINTERS), all access to these members must
go via appropriate accessors. This just mass-converts dynamic_debug.c to
use the new accessors.
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
lib
I'm going to need to refer to the JUMP_TYPE_FALSE and JUMP_TYPE_TRUE
constants from asm code. In order to do that, move them to an
asm-generic header and define them using the UL() helper macro.
Cc: Ingo Molnar
Cc: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/asm-ge
With coming changes on x86-64, all dynamic debug descriptors in a
translation unit must have distinct names. The macro _dynamic_func_call
takes care of that. No functional change.
Cc: linux-a...@vger.kernel.org
Acked-by: Rafael J. Wysocki
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
four byte hole after these fields, so we
could just give flags and lineno each their own u32. But I don't think
that's worth the ifdeffery.
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/dynamic_debug.h | 12 --
lib/dynamic_debug.c
].
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
kernel/module.c | 4 +---
lib/dynamic_debug.c | 4 +++-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/module.c b/kernel/module.c
index 49a405891587..80ede55db25a 100644
--- a/kernel/module.c
+++ b/kernel
dynamic debug may be implemented via static keys, but ACPI is missing
out on that runtime benefit since it open-codes one possible definition
of DYNAMIC_DEBUG_BRANCH.
Cc: linux-a...@vger.kernel.org
Acked-by: Jason Baron
Acked-by: Rafael J. Wysocki
Signed-off-by: Rasmus Villemoes
---
include
core.c (incidentally, there is an in-tree module whose name
is core, but I just tested this with an out-of-tree trivial one).
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
lib/dynamic_debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/dynamic_debug.c b/lib
.
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/dynamic_debug.h | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index 2fd8006153c3..0a643316597c 100644
--- a/include
_func_call - though the hex_dump case requires
a slight variant, since print_hex_dump does not take the _ddebug
descriptor. We'll also get to use that variant elsewhere (btrfs).
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/dynamic_debug.h | 72 +---
: Greg Kroah-Hartman
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/device.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/device.h b/include/linux/device.h
index 061cd83ac64c..6e0909db6dda 100644
--- a/include/linux/device.h
+++ b
thout
at least one arch opting in to use DYNAMIC_DEBUG_RELATIVE_POINTERS).
Rasmus Villemoes (23):
linux/device.h: use DYNAMIC_DEBUG_BRANCH in dev_dbg_ratelimited
linux/device.h: use unique identifier for each struct _ddebug
linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited
linux/net.h: use u
Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/device.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/device.h b/include/linux/device.h
index 1b25c7a43f4c..061cd83ac64c 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1538,7 +1538,7
teven Rostedt
Signed-off-by: Rasmus Villemoes
---
include/linux/printk.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index cf3eccfe1543..d3ba3245531d 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -466,7 +
: Petr Mladek
Acked-by: Jason Baron
Cc: Steven Rostedt
Signed-off-by: Rasmus Villemoes
---
include/linux/printk.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index d3ba3245531d..70df2c578d40 100644
--- a/include/linux
pens in combination with a O=... parameter. In any case, we
don't lose much by explicitly disabling the parallelism for the clean
target, and it makes automated builds much more reliable.
Signed-off-by: Rasmus Villemoes
---
Another option is to add -ignore_readdir_race to all find commands,
b
On 2018-07-05 15:49, Jiri Olsa wrote:
> On Thu, Jul 05, 2018 at 03:15:27PM +0200, Rasmus Villemoes wrote:
>> this only happens in combination with a O=... parameter. In any case, we
>> don't lose much by explicitly disabling the parallelism for the clean
>> target, and
bitmap should turn up.
Not-really-signed-off-by: Rasmus Villemoes
---
include/linux/bitmap.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index 1ee46f492267..a5879cb45687 100644
--- a/include/linux/bitmap.h
+++ b/include/l
These patches eliminate two (albeit tiny and shortlived) processes
from the cmd_and_fixdep rule, i.e. from every TU being
compiled. Whether the diffstat below is worth it I'll leave to Kbuild
maintainers to decide.
Rasmus Villemoes (3):
Kbuild: refactor fixdep to use getopt()
Kbuild:
behaviour of keeping the depfile if fixdep exits
prematurely.
Signed-off-by: Rasmus Villemoes
---
scripts/Kbuild.include | 7 +++
scripts/basic/fixdep.c | 10 --
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index d
Avoid spawning one more process per TU by having fixdep open the tmpfile
and rename to its final name.
The only change in behaviour is that if fixdep fails, the tmpfile we
leave behind is $(dot-target).cmd.tmp rather than $(dot-target).tmp .
Signed-off-by: Rasmus Villemoes
---
scripts
As preparation for teaching an old dog a few new tricks.
Signed-off-by: Rasmus Villemoes
---
scripts/basic/fixdep.c | 21 ++---
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 850966f3d602..666041841200 100644
This code should check the return value of seq_open(); if it failed,
file->private_data is NULL. But in that case we then need to dispose of
objbuf to prevent a resource leak.
Signed-off-by: Rasmus Villemoes
---
arch/ia64/sn/kernel/sn2/sn_hwperf.c | 8 ++--
1 file changed, 6 inserti
On 2018-08-17 01:21, Yury Norov wrote:
> Hi Rasmus,
>
> On Wed, Aug 15, 2018 at 10:55:39AM +0200, Rasmus Villemoes wrote:
>> Most of the inline bitmap functions are buggy if passed a compile-time
>> constant nbits==0.
>
> I think it's bad wording. Functions are O
7;bool'; did you
>> mean '_Bool'?
bool __cond = !(condition);\
for something I'm working on.
Rather than contributing to the #include madness and including
linux/types.h from compiler.h, just use int.
Signed-off-by: Rasmus Villemoes
---
include/linux/compiler.h
A recent LKML thread had me look into bitmap.{h,c} again, and I
stumbled on/rediscovered a few things.
Rasmus Villemoes (7):
lib/bitmap.c: remove wrong documentation
linux/bitmap.h: handle constant zero-size bitmaps correctly
linux/bitmap.h: remove redundant uses of small_const_nbits
This promise is violated in a number of places, e.g. already in the
second function below this paragraph. Since I don't think anybody relies
on this being true, and since actually honouring it would hurt
performance and code size in various places, just remove the paragraph.
Signed-off-by: R
0' to that final byte in the page, but that's an improvement: We now
guarantee that after the call, buf is a properly terminated C string of
length exactly the return value.
Signed-off-by: Rasmus Villemoes
---
lib/bitmap.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff
huge, scnprintf()
ends up writing beyond the page boundary.
I don't think any current callers actually write anything before
bitmap_print_to_pagebuf, but the API seems to be designed to allow it.
Signed-off-by: Rasmus Villemoes
---
lib/bitmap.c | 9 +
1 file changed, 5 insertions(
It's not clear what's so horrible about emitting a function call to
handle a run-time sized bitmap. Moreover, gcc also emits a function call
for a compile-time-constant-but-huge nbits, so the comment isn't even
accurate.
Signed-off-by: Rasmus Villemoes
---
include/linux/bitma
0020 :
20: 48 8b 06mov(%rsi),%rax
23: 48 89 07mov%rax,(%rdi)
26: c3 retq
Signed-off-by: Rasmus Villemoes
---
include/linux/bitmap.h | 24 ++--
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git
Most other bitmap API, including the OOL version __bitmap_shift_right,
take unsigned nbits. This was accidentally left out from 2fbad29917c98.
Fixes: 2fbad29917c98 (lib: bitmap: change bitmap_shift_right to take unsigned
parameters)
Reported-by: Yury Norov
Signed-off-by: Rasmus Villemoes
n
teaching all the static inlines an "if (zero_const_nbits())", and since
we don't have any current instances, this doesn't affect existing code
at all.
[1] lkml.kernel.org/r/20180815085539.27485-1-li...@rasmusvillemoes.dk
Signed-off-by: Rasmus Villemoes
---
include/linu
Using the seq_open_data() helper, exports_net_open() essentially becomes
a oneliner.
Signed-off-by: Rasmus Villemoes
---
Depends on 1/8 introducing seq_open_data.
fs/nfsd/nfsctl.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
Simplify the code slightly by having seq_open_data do the ->private
assignment.
Signed-off-by: Rasmus Villemoes
---
Depends on 1/8 introducing seq_open_data.
Not including Thierry's ack/reviewed-by since it's been half a year since v1.
drivers/pci/controller/pci-tegra.c | 11 +
Simplify the code slightly by using the seq_open_data helper.
Signed-off-by: Rasmus Villemoes
---
Depends on 1/8 introducing seq_open_data.
fs/proc/base.c | 15 +++
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index aaffc0c30216
Signed-off-by: Rasmus Villemoes
---
fs/seq_file.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/seq_file.c b/fs/seq_file.c
index 518a72e444d9..5cc4670294e7 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -632,18 +632,15 @@ void *__seq_open_private(struct file *f
Avoid the somewhat hard to grok assignment by using the seq_open_data
helper.
Signed-off-by: Rasmus Villemoes
---
fs/seq_file.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/seq_file.c b/fs/seq_file.c
index c8c86660f6db..518a72e444d9 100644
--- a/fs/seq_file.c
s those).
On a positive note, maybe 4.19 will be a rare exception; as of
1f7a4c73a739, the median bloat factor is down to 236.0, the average .c
file has increased by 0.4% but the average total translation unit is
nevertheless 1.2% smaller, compared to v4.18.
Signed-off-by: Rasmus Villemoes
---
For some s
On 2018-08-19 14:37, Andy Shevchenko wrote:
> On Sat, Aug 18, 2018 at 4:17 PM Rasmus Villemoes
> wrote:
>>
>> int bitmap_print_to_pagebuf(bool list, char *buf, const unsigned long
>> *maskp,
>> int nmaskbits)
>> {
>> -
On 17/12/2018 00.16, Stephen Rothwell wrote:
> Hi all,
>
> After merging the nfs-anna tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> /home/sfr/next/next/fs/nfs/nfsroot.c: In function 'root_nfs_data':
> /home/sfr/next/next/fs/nfs/nfsroot.c:264:5: error: implicit de
On 21/12/2018 23.20, Joe Perches wrote:
> On Fri, 2018-12-21 at 16:08 -0500, Steven Rostedt wrote:
>> On Fri, 21 Dec 2018 21:58:32 +0100
>> Andreas Schwab wrote:
>>
>>
Well, perhaps I can just remove the ending ones. I get paranoid with
macro variables, and tend to over do it so that the
On 23/12/2018 23.56, Steven Rostedt wrote:
> On Sun, 23 Dec 2018 23:01:52 +0100
> Rasmus Villemoes wrote:
>
>> On 21/12/2018 23.20, Joe Perches wrote:
>>>
>>> Using
>>>
>>> static inline bool str_has_prefix(const char *str, const char prefix[]
teven Rostedt
Signed-off-by: Rasmus Villemoes
---
include/linux/printk.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index cf3eccfe1543..d3ba3245531d 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -466,7 +
as long as the struct ddebug_table, since
free_module() calls ddebug_remove_module().
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
lib/dynamic_debug.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index c7
For symmetry with ddebug_remove_module, and to avoid a bit of ifdeffery
in module.c, move the declaration of ddebug_add_module inside #if
defined(CONFIG_DYNAMIC_DEBUG) and add a corresponding no-op stub in the
#else branch.
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include
].
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
kernel/module.c | 4 +---
lib/dynamic_debug.c | 4 +++-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/module.c b/kernel/module.c
index 6746c85511fe..381f9bf282fe 100644
--- a/kernel/module.c
+++ b/kernel
nder virtme and that the dynamic_debug control file
has the expected contents.
Rasmus Villemoes (23):
linux/device.h: use DYNAMIC_DEBUG_BRANCH in dev_dbg_ratelimited
linux/device.h: use unique identifier for each struct _ddebug
linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimite
With coming changes on x86-64, all dynamic debug descriptors in a
translation unit must have distinct names. The macro _dynamic_func_call
takes care of that. No functional change.
Cc: linux-a...@vger.kernel.org
Acked-by: Rafael J. Wysocki
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
descriptor, "bla") - even with a helpful
error message saying that '"descriptor" used as _ddebug identifer more
than once'.
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
arch/x86/include/asm/dynamic_debug.h | 7 ++-
1 file changed, 6 insertions(+), 1 de
When we introduce compact versions of these pointers (a la
CONFIG_GENERIC_BUG_RELATIVE_POINTERS), all access to these members must
go via appropriate accessors. This just mass-converts dynamic_debug.c to
use the new accessors.
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
lib
same descriptor object is the right thing to do; that is also what
happens when it is the compiler that defines a static object inside an
inline(d) function.
Cc: x...@kernel.org
Reviewed-by: Ingo Molnar
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
arch/x86/Kconfig
These will be useful when defining the contents of (a struct containing)
a static key in inline assembly.
Cc: x...@kernel.org
Reviewed-by: Ingo Molnar
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
arch/x86/include/asm/jump_label.h | 18 ++
include/linux
suitable DEFINE_DYNAMIC_DEBUG_METADATA macro in
.
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/dynamic_debug.h | 14 ++
lib/Kconfig.debug | 3 +++
lib/dynamic_debug.c | 20
3 files changed, 37 insertions(+)
diff
four byte hole after these fields, so we
could just give flags and lineno each their own u32. But I don't think
that's worth the ifdeffery.
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/dynamic_debug.h | 12 --
lib/dynamic_debug.c
Using the new _dynamic_func_call_no_desc helper macro from
dynamic_debug.h takes care of both of these.
Cc: linux-bt...@vger.kernel.org
Acked-by: David Sterba
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
fs/btrfs/ctree.h | 34 ++
1 file change
If CONFIG_DYNAMIC_DEBUG is not set, acpi_handle_debug directly invokes
acpi_handle_printk (if DEBUG) or does a no-printk (if !DEBUG). So this
macro is never used.
Cc: linux-a...@vger.kernel.org
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/acpi.h | 3 ---
1 file
dynamic debug may be implemented via static keys, but ACPI is missing
out on that runtime benefit since it open-codes one possible definition
of DYNAMIC_DEBUG_BRANCH.
Cc: linux-a...@vger.kernel.org
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/acpi.h | 2 +-
1 file
Baron
Signed-off-by: Rasmus Villemoes
---
lib/dynamic_debug.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index ab81155f928d..f1de45a100fa 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -868,7 +868,6 @@ int ddebug_add_module(struct
_func_call - though the hex_dump case requires
a slight variant, since print_hex_dump does not take the _ddebug
descriptor. We'll also get to use that variant elsewhere (btrfs).
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/dynamic_debug.h | 72 +---
: Petr Mladek
Acked-by: Jason Baron
Cc: Steven Rostedt
Signed-off-by: Rasmus Villemoes
---
include/linux/printk.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index d3ba3245531d..70df2c578d40 100644
--- a/include/linux
core.c (incidentally, there is an in-tree module whose name
is core, but I just tested this with an out-of-tree trivial one).
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
lib/dynamic_debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/dynamic_debug.c b/lib
.
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/dynamic_debug.h | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index 2fd8006153c3..0a643316597c 100644
--- a/include
: Greg Kroah-Hartman
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/device.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/device.h b/include/linux/device.h
index 0d8ed2adfc73..81108db013e4 100644
--- a/include/linux/device.h
+++ b
Baron
Signed-off-by: Rasmus Villemoes
---
include/linux/device.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/device.h b/include/linux/device.h
index 8f882549edee..0d8ed2adfc73 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1503,7 +1503,7
On 2018-10-27 14:06, Miguel Ojeda wrote:
> Hi Rasmus,
>
> On Sat, Oct 27, 2018 at 1:24 AM Rasmus Villemoes
> wrote:
>>
>> +/*
>> + * Optional
>
> I did quick check and gcc >= 4.1, clang >= 3.0, icc >= 13 compilers
> seem to support it (or at l
single caller which passes "%s" as fmt, so
we might as well just use that directly. That also paves the way for
further cleanups that will actually make that format string go away
entirely.
Signed-off-by: Rasmus Villemoes
---
kernel/trace/trace_output.c | 9 -
1 file changed, 4
-> offset.
Rasmus Villemoes (3):
tracing: merge seq_print_sym_short() and seq_print_sym_offset()
tracing: avoid -Wformat-nonliteral warning
tracing: simplify printf'ing in seq_print_sym
kernel/trace/trace_output.c | 38 -
1 file changed, 8 insertion
the declaration of the str buffer inside the CONFIG_KALLSYMS guard,
which in turn will make gcc inline the function for !CONFIG_KALLSYMS (it
only has a single caller, but the huge stack frame seems to make gcc not
inline it for CONFIG_KALLSYMS).
Signed-off-by: Rasmus Villemoes
---
kernel/trace/tra
These two functions are nearly identical, so we can avoid some code
duplication by moving the conditional into a common implementation.
Signed-off-by: Rasmus Villemoes
---
kernel/trace/trace_output.c | 34 +++---
1 file changed, 7 insertions(+), 27 deletions(-)
diff
On 2018-10-27 21:47, Alexey Dobriyan wrote:
> On Fri, Oct 26, 2018 at 11:20:34PM +0200, Rasmus Villemoes wrote:
>> +#include
>
>> +#define linux_proc_banner \
>> +"%s version %s" \
>> +" (" LINUX_COMPILE_BY "@" LINUX_COMPILE_
On 2018-10-10 18:14, Laurent Vivier wrote:
> + /* create a new binfmt namespace
> + * if we are not in the first user namespace
> + * but the binfmt namespace is the first one
> + */
> + if (READ_ONCE(ns->binfmt_ns) == NULL) {
> + struct binfmt_namespace *new_ns;
, we will
live with that wasted space.
Signed-off-by: Rasmus Villemoes
---
init/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/init/main.c b/init/main.c
index a664246450d1..39709ca33316 100644
--- a/init/main.c
+++ b/init/main.c
@@ -92,6 +92,7 @@
#include
#include
#include
Just to have a quick way of seeing that rai-patching works (i.e., once
we implement rai_load, we'd not expect the output to change). Also,
inside virtme we can do a quick "gdb vmlinux /proc/kcode" and
disassemble rai_proc_show to see how the patched function looks.
Signed-off-by: R
8902e9b1
0x8902e906: mov%r12,%rax
0x8902e909: mov%r12d,%r10d
0x8902e90c: mov%rdx,%r15
The shr $0x12, %eax is consistent with
[ 0.300676] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
and nothing seems to explode.
Signed-off-
%rcx or any other) and adjust the stack
pointer.
The patched code does need to do a shr, so I don't think there's a way
around the cc clobber.
Signed-off-by: Rasmus Villemoes
---
arch/x86/include/asm/rai.S | 59 ++
arch/x86/include
Signed-off-by: Rasmus Villemoes
---
arch/x86/kernel/rai.c | 12
1 file changed, 12 insertions(+)
diff --git a/arch/x86/kernel/rai.c b/arch/x86/kernel/rai.c
index e55e85f11a2e..c4284ce7478f 100644
--- a/arch/x86/kernel/rai.c
+++ b/arch/x86/kernel/rai.c
@@ -63,11 +63,21
Signed-off-by: Rasmus Villemoes
---
arch/Kconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/Kconfig b/arch/Kconfig
index 9d329608913e..160893bd6a5c 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -275,6 +275,9 @@ config ARCH_THREAD_STACK_ALLOCATOR
config
Signed-off-by: Rasmus Villemoes
---
include/asm-generic/vmlinux.lds.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/include/asm-generic/vmlinux.lds.h
b/include/asm-generic/vmlinux.lds.h
index f09ee3c544bc..f38510c6bfcc 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm
This avoids a cacheline access to get the value of the inode_cachep
pointer in the places that do a kmem_cache_*(inode_cachep, ...);
Signed-off-by: Rasmus Villemoes
---
fs/inode.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index
This just sets things up so that the ARCH_HAS_RAI symbol gets selected,
and prepare the arch-specific headers and support functions.
Signed-off-by: Rasmus Villemoes
---
arch/x86/Kconfig | 1 +
arch/x86/include/asm/rai.S | 18 ++
arch/x86/include/asm/rai.h | 25
eated "cat /proc/rai" continues to print
"one: 1, two: 2, three: 3".
Signed-off-by: Rasmus Villemoes
---
arch/x86/include/asm/rai.S | 42 +-
arch/x86/include/asm/rai.h | 30 ++-
arch/x86/kernel/rai.c | 18 +++
This avoids a cacheline access to get the value of the dentry_cache
pointer in the places that do a kmem_cache_*(dentry_cache, ...);
Signed-off-by: Rasmus Villemoes
---
fs/dcache.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index
riable sufficiently rarely that it's no longer in
L1, that extra cache miss is hardly noticable.
Comments? Flames?
Signed-off-by: Rasmus Villemoes
---
include/linux/rai.h | 83 +
1 file changed, 83 insertions(+)
create mode 100644 include/l
On 2018-10-11 01:03, Bryan O'Donoghue wrote:
> On 05/10/2018 15:28, Rasmus Villemoes wrote:
>> Signed-off-by: Rasmus Villemoes
>> ---
>> I have no idea if the performance matters (it probably doesn't). Feel
>> free to ignore this and the followup cleanup.
>
On 2018-10-14 06:19, William Breathitt Gray wrote:
> a bit value of 0 in the
> bits array does not necessarily mean the input was not requested, but
> may instead mean that the value at the input is 0;
sure enough, but...
> therefore, the caller
> must keep track of the requested inputs rather t
, and the
lbid field is entirely unused outside of this function, so it seems we
can just drop it entirely.
Signed-off-by: Rasmus Villemoes
---
Since lbid isn't mentioned anywhere else in greybus/, it's hard to
figure out how it was meant to be used. It does seem like entirely
dead (wri
"Append to the list and do a merge sort" is not really an insertion
sort. While a few more lines of code, we can keep the list sorted doing
at most n comparisons by iterating until we find the first element
strictly greater than gb.
Signed-off-by: Rasmus Villemoes
---
I have no i
gb_loopback_bus_id_compare only has a single caller, and it no longer
needs to have a prototype compatible with being a callback for
list_sort.
Signed-off-by: Rasmus Villemoes
---
drivers/staging/greybus/loopback.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a
On 2018-10-04 21:33, H. Peter Anvin wrote:
> Here is the horrible code I mentioned yesterday. This is about
> implementing the immediate-patching framework that Linus and others have
> discussed (it helps both performance and kernel hardening):
Heh, I did a POC in userspace some years ago for lo
On 2018-11-02 11:36, Miguel Ojeda wrote:
> Hi Rasmus,
>
> On Sat, Oct 27, 2018 at 2:06 PM Miguel Ojeda
> wrote:
>>
>> I did quick check and gcc >= 4.1, clang >= 3.0, icc >= 13 compilers
>> seem to support it (or at least recognize it, even if they just ignore
>> it), so we do not need to make it
Since the definition of struct crng_state is private to random.c, and
primary_crng is neither declared or used elsewhere, there's no reason
for that symbol to have external linkage.
Signed-off-by: Rasmus Villemoes
---
drivers/char/random.c | 2 +-
1 file changed, 1 insertion(+), 1 del
Never modified, might as well be put in .rodata.
Signed-off-by: Rasmus Villemoes
---
drivers/char/random.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 2eb70e76ed35..320108df04c1 100644
--- a/drivers/char/random.c
+++ b
This field is never used, might as well remove it.
Signed-off-by: Rasmus Villemoes
---
drivers/char/random.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 320108df04c1..1b2e1580b4b5 100644
--- a/drivers/char
[trimming cc list]
On 2018-11-01 23:57, Kees Cook wrote:
> On Thu, Nov 1, 2018 at 3:06 PM, Rasmus Villemoes
> wrote:
>> referring to an anonymous object in .rodata; one gets code gen like
>>
>> +: 31 c0 xor%eax,%eax
>> +:
201 - 300 of 1998 matches
Mail list logo