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
t use
distinct identifiers.
Using the new _dynamic_func_call_no_desc helper macro from
dynamic_debug.h takes care of both of these. No functional change.
Cc: linux-bt...@vger.kernel.org
Acked-by: David Sterba
Acked-by: Jason Baron
Signed-off-by: Rasmus Villemoes
---
fs/btrfs/ctree.h
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
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
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 db
On 12/02/2019 18.58, Joe Perches wrote:
> On Tue, 2019-02-12 at 14:00 +0100, Petr Mladek wrote:
>> On Fri 2019-02-08 09:11:17, Joe Perches wrote:
>>> On Fri, 2019-02-08 at 16:23 +0100, Petr Mladek wrote:
Move the code from the long pointer() function. We are going to improve
error handlin
Instead of doing this compile-time check in some slightly arbitrary
user of struct filename, put it next to the definition.
Signed-off-by: Rasmus Villemoes
---
v2: added, mostly as an example of use of static_assert(), to check
that the compiler actually groks it. Feel free to NAK it as useless
tic_assert(expr, msg, ...) _Static_assert(expr, "" msg "")
godbolt.org suggests that _Static_assert() has been support by clang
since at least 3.0.0.
Signed-off-by: Rasmus Villemoes
---
v2: drop useless "" "" wrapping
include/linux/build_bug.h | 19
.
Also add the appropriate #include to avoid relying on build_bug.h
being pulled in via some arbitrary chain of includes.
Signed-off-by: Rasmus Villemoes
---
v2: added, mostly as an example of use of static_assert(), to check
that the compiler actually groks it.
lib/vsprintf.c | 5 +++--
1 file
On 06/02/2019 01.10, Dmitry Safonov wrote:
> As it has been discussed on timens RFC, adding a new conditional branch
> `if (inside_time_ns)` on VDSO for all processes is undesirable.
> It will add a penalty for everybody as branch predictor may mispredict
> the jump. Also there are instruction cach
On 05/02/2019 00.13, Dave Chinner wrote:
> On Mon, Feb 04, 2019 at 11:12:57PM +0100, Rasmus Villemoes wrote:
>> On 04/02/2019 22.53, Dave Chinner wrote:
>>> On Mon, Feb 04, 2019 at 10:20:35PM +0100, Rasmus Villemoes wrote:
>>>> linux/tracepoints.h allows individu
On 05/02/2019 00.12, Andrew Morton wrote:
>>
>> It would be (very) nice to actually use this macro in a few places so
>> it gets its build testing while in -next.
>
> ie, just about every BUILD_BUG_ON in mm/ could use this. Let's switch
> a few?
>
Perhaps, but some make sense where they are, e.
On 05/02/2019 09.05, Masahiro Yamada wrote:
> On Mon, Feb 4, 2019 at 4:24 AM Rasmus Villemoes
> wrote:
>>
>> BUILD_BUG_ON() is a little annoying, since it cannot be used outside
>> function scope. So one cannot put assertions about the sizeof() a
>> struct next to
On 04/02/2019 22.53, Dave Chinner wrote:
> On Mon, Feb 04, 2019 at 10:20:35PM +0100, Rasmus Villemoes wrote:
>> linux/tracepoints.h allows individual subsystems to disable their
>> tracepoints. Add such a knob for xfs. Disabling XFS_TRACEPOINTS
>> reduces the resident size
632 676487 a5287 /tmp/xfs/a/xfs.ko
893192 166737 632 1060561 102ed1 /tmp/xfs/b/xfs.ko
Signed-off-by: Rasmus Villemoes
---
fs/xfs/Kconfig | 9 +
fs/xfs/xfs_trace.h | 4
2 files changed, 13 insertions(+)
diff --git a/fs/xfs/Kconfig b/fs/xfs/Kconfig
index 457ac9f97377
tic_assert(expr, msg, ...) _Static_assert(expr, "" msg "")
godbolt.org suggests that _Static_assert() has been support by clang
since at least 3.0.0.
Signed-off-by: Rasmus Villemoes
---
include/linux/build_bug.h | 19 +++
1 file changed, 19 insertions(
On 29/01/2019 21.35, Rasmus Villemoes wrote:
> On 22/01/2019 18.29, Guenter Roeck wrote:
>> On Mon, Jan 21, 2019 at 08:45:39PM +0000, Rasmus Villemoes wrote:
>>>
>>> static void watchdog_ping_work(struct kthread_work *work)
>>> @@ -297,7 +317,7 @@ static int
On 22/01/2019 18.29, Guenter Roeck wrote:
> On Mon, Jan 21, 2019 at 08:45:39PM +0000, Rasmus Villemoes wrote:
>> The watchdog framework takes care of feeding a hardware watchdog until
>> userspace opens /dev/watchdogN. If that never happens for some reason
>> (buggy init
ping
On 15/01/2019 16.46, Rasmus Villemoes wrote:
> With CONFIG_DEV_COREDUMP=y and CONFIG_DEBUG_FS=n, building fails:
>
> drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:4: error: ‘struct msm_gpu_funcs’
> has no member named ‘show’
>.show = adreno_show,
> ^~~~
> drive
Commit-ID: 49b8e2beceda79ae25938faf68fad0ad62534852
Gitweb: https://git.kernel.org/tip/49b8e2beceda79ae25938faf68fad0ad62534852
Author: Rasmus Villemoes
AuthorDate: Sat, 3 Nov 2018 00:06:23 +0100
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 21 Jan 2019 15:15:57 -0300
perf
, and is
of course immensely useful for development purposes while one has
console acccess, as well as usable in the cases where one can make a
permanent update of the kernel command line.
Signed-off-by: Rasmus Villemoes
---
Documentation/watchdog/watchdog-parameters.txt | 8
drivers/wat
/watchdog; conversely, one can
of course also have the current behaviour of allowing indefinite time
until the first open, and then set that module parameter.
Signed-off-by: Rasmus Villemoes
---
.../watchdog/watchdog-parameters.txt | 8 +
drivers/watchdog/watchdog_dev.c | 30
c' line with the timestamp of the 'U-Boot SPL ...'
line (which appears just after reset).
Suggested-by: Guenter Roeck
Signed-off-by: Rasmus Villemoes
---
drivers/watchdog/watchdog_dev.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/watchdo
y easy by the ktime_t conversion.
v7 submission at
<https://lore.kernel.org/lkml/1511865350-20665-1-git-send-email-rasmus.villem...@prevas.dk/>
Rasmus Villemoes (3):
watchdog: introduce watchdog.open_timeout commandline parameter
watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT
watchdog: m
, and is
of course immensely useful for development purposes while one has
console acccess, as well as usable in the cases where one can make a
permanent update of the kernel command line.
Signed-off-by: Rasmus Villemoes
---
Documentation/watchdog/watchdog-parameters.txt | 3 ++-
drivers/wat
2-wdt 20bc000.wdog: timeout nnn sec' line with
the timestamp of the 'U-Boot SPL ...' line (which appears just after
reset).
Suggested-by: Guenter Roeck
Signed-off-by: Rasmus Villemoes
---
drivers/watchdog/watchdog_dev.c | 11 ++-
1 file changed, 6 insertions(+), 5 dele
.kernel.org/lkml/1511865350-20665-1-git-send-email-rasmus.villem...@prevas.dk/>
Rasmus Villemoes (3):
watchdog: introduce watchdog.open_timeout commandline parameter
watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT
watchdog: make the device time out at open_deadline when open_
initially, requiring a somewhat liberal open_timeout, but when (for
whatever reason) the application might then want to re-exec itself, it
can set a much smaller threshold.
Signed-off-by: Rasmus Villemoes
---
.../watchdog/watchdog-parameters.txt | 8 +
drivers/watchdog/watchdog_dev.c
hang)
Cc: sta...@vger.kernel.org # v4.19+
Signed-off-by: Rasmus Villemoes
---
drivers/gpu/drm/msm/msm_gpu.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h
index efb49bb64191..4cb41db7f9e8 100644
--- a/drivers
Commit-ID: 2e905c7abdcd5ff09b9df33d25eb7148c85bed2a
Gitweb: https://git.kernel.org/tip/2e905c7abdcd5ff09b9df33d25eb7148c85bed2a
Author: Rasmus Villemoes
AuthorDate: Fri, 11 Jan 2019 09:49:31 +0100
Committer: Borislav Petkov
CommitDate: Sat, 12 Jan 2019 17:54:49 +0100
x86/asm: Remove
Commit-ID: 88ca66d8540ca26119b1428cddb96b37925bdf01
Gitweb: https://git.kernel.org/tip/88ca66d8540ca26119b1428cddb96b37925bdf01
Author: Rasmus Villemoes
AuthorDate: Fri, 11 Jan 2019 09:49:30 +0100
Committer: Borislav Petkov
CommitDate: Sat, 12 Jan 2019 17:50:48 +0100
x86/asm: Remove
On 19/12/2018 07.00, William Breathitt Gray wrote:
> +/**
> + * bitmap_set_value8 - set an 8-bit value within a memory region
> + * @bitmap: address to the bitmap memory region
> + * @value: the 8-bit value
> + * @start: bit offset of the 8-bit value
> + */
> +void bitmap_set_value8(unsigned long *
We require gcc >= 4.6, so these can be removed.
Signed-off-by: Rasmus Villemoes
---
arch/x86/include/asm/bitops.h| 6 --
arch/x86/include/asm/string_32.h | 20
arch/x86/include/asm/string_64.h | 15 ---
3 files changed, 41 deletions(-)
diff --gi
Nothing refers to the __constant_c_x_memset macro anymore, and when we
remove that, the two referenced static inline functions become orphan.
Signed-off-by: Rasmus Villemoes
---
arch/x86/include/asm/string_32.h | 84
1 file changed, 84 deletions(-)
diff --git a
ping
On Sun, 4 Nov 2018 at 20:26, Jiri Olsa wrote:
>
> On Sat, Nov 03, 2018 at 12:06:23AM +0100, Rasmus Villemoes wrote:
> > An automatic const char[] variable gets initialized at runtime, just
> > like any other automatic variable. For long strings, that uses a lot of
> &g
On 10/01/2019 00.55, Nick Desaulniers wrote:
> I agree that something like builtin_types_compatible_p() in a macro
> could help make these functions more "generic" in the sense of being
> able to accept either a `struct xarray*` or `struct xarray_cyclic*`.
An alternative to implementing all the g
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[]
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 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 29/11/2018 20.22, Josh Poimboeuf wrote:
> On Thu, Nov 29, 2018 at 02:16:48PM -0500, Steven Rostedt wrote:
>>> and honestly, the way "static_call()" works now, can you guarantee
>>> that the call-site doesn't end up doing that, and calling the
>>> trampoline function for two different static call
On 15/11/2018 09.27, Masahiro Yamada wrote:
> GNU Make supports 'define' ... 'endef' directive, which can describe
> a recipe that consists of multiple lines.
>
> endef
>
> This does not actually exploit the benefits of 'define' ... 'endef'
> form. All shell commands must be concatenated with '
On 13/11/2018 08.26, Yi Wang wrote:
> We get two warning when building kernel with W=1:
> kernel/fork.c:167:13: warning: no previous prototype for
> ‘arch_release_thread_stack’ [-Wmissing-prototypes]
> kernel/fork.c:779:13: warning: no previous prototype for ‘fork_init’
> [-Wmissing-prototypes]
: 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
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 +
: 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
.
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 +---
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
---
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
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
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
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
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
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
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
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
On 09/11/2018 16.16, Andy Lutomirski wrote:
> On Thu, Nov 8, 2018 at 11:28 PM Ingo Molnar wrote:
>>
>>
>> All other usecases are bonus, but it would certainly be interesting to
>> investigate the impact of using these APIs for tracing: that too is a
>> feature enabled everywhere but utilized only
On 2018-11-05 22:48, Bart Van Assche wrote:
> On Mon, 2018-11-05 at 13:13 -0800, Andrew Morton wrote:
>> On Mon, 5 Nov 2018 12:40:00 -0800 Bart Van Assche
>> wrote:
>>
>>> This patch suppresses the following sparse warning:
>>>
>>> ./include/linux/slab.h:332:43: warning: dubious: x & !y
>>>
>>>
kstrdup_quotable_cmdline takes gfp flags and passes those on to
kstrdup_quotable, but before that it has done a kmalloc(PAGE_SIZE) with
a hard-coded GFP_KERNEL. There is one caller of kstrdup_quotable_cmdline
which passes GFP_ATOMIC, and the commit introducing that (65a3c2748e)
conveniently has thi
On 2018-11-01 23:57, Kees Cook wrote:
>> Yes, gcc should be able to infer the constness of drv from the fact that
>> it's never assigned to elsewhere in the function... I think I saw that
>> on some gcc todo list at some point.
>
> If you find that bug, I'll add it to my gcc bug tracking list. :P
20 20 movabs $0x20202e646e756f66,%rax
Make them all static so that the compiler just references objects in .rodata.
Signed-off-by: Rasmus Villemoes
---
tools/perf/builtin-c2c.c| 4 ++--
tools/perf/builtin-kmem.c | 4 ++--
tools/perf/builtin-report.c | 6 +++---
tools/perf/bu
ction old new delta
trace_default_header 663 642 -21
tracing_mark_raw_write 406 355 -51
tracing_mark_write 624 557 -67
Total: Before=63721, After=63582, chg -0.22%
Signed-off-by: Rasmus Vill
faulted variable used in
tracing_mark_raw_write().
Finally, for the two runs of spaces, just use variables initialized with
string literals; the linker (at least for x86) will reuse the tail of
the longer for the shorter string.
Signed-off-by: Rasmus Villemoes
---
kernel/trace/ftrace.c | 2
[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
>> +:
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
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
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
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_
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
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
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
Commit-ID: 2022cceb4e30f1bb4c84d40ffa705aa8d8d68adb
Gitweb: https://git.kernel.org/tip/2022cceb4e30f1bb4c84d40ffa705aa8d8d68adb
Author: Rasmus Villemoes
AuthorDate: Sat, 27 Oct 2018 00:20:04 +0200
Committer: Ingo Molnar
CommitDate: Mon, 29 Oct 2018 07:19:26 +0100
x86/traps: Use format
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
One is supposed to pass in a format string containing (at most) one %u
instance. Use fmtcheck() to enforce that at runtime, WARNing and falling
back to a harmless "kthread/%u" in case verification fails.
Signed-off-by: Rasmus Villemoes
---
kernel/kthread.c | 4 ++--
1 file changed, 2
ever appear in a hot path.
The BSDs (and libbsd on linux) contain a fmtcheck() function; I took the
name and return semantics from that.
Signed-off-by: Rasmus Villemoes
---
include/linux/kernel.h | 18
lib/Kconfig.debug | 9 ++
lib/vsprintf.c | 65 ++
mpiler cannot do any type checking.
Even a static inline fmtcheck() that just returns its first argument
would provide documentation for which specifiers what->ever is supposed
to contain, but we'll implement an actual run-time check later.
Signed-off-by: Rasmus Villemoes
---
include/lin
check of fmt to ensure it doesn't contain odd printf
specifiers that would make snprintf go off into the weeds. The lack of
the FMTCHECK_NO_EXTRA_ARGS flag (i.e., the last 0 argument) means we
allow either no specifiers or precisely one occurrence of %s in tmp.
Signed-off-by: Rasmus Vi
It should be trivial to add more test cases, once we figure out the
exact rules for being compatible or not. Perhaps we'll have to extend
the struct test with a flags element if we add flags that affect the
return value.
Signed-off-by: Rasmus Villemoes
---
lib/test_printf.c
Some users may prefer to check a "user-supplied" string upfront and
return EINVAL rather than using the the template as a fallback for
printf'ing later. fmtmatch() is simply a shorthand for
fmtcheck(a, b, c | FMTCHECK_SILENT) == a.
Signed-off-by: Rasmus Villemoes
---
include
with a string not
containing format specifiers, but we might as well silence this warning
using "%s" as format string.
Signed-off-by: Rasmus Villemoes
---
arch/x86/kernel/traps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kern
complain in the unlikely case one of the
LINUX_* strings ended up containing a %. This also avoids compiling it
in for !CONFIG_PROC_FS.
Signed-off-by: Rasmus Villemoes
---
fs/proc/version.c | 6 ++
include/linux/printk.h | 1 -
init/version.c | 5 -
3 files changed, 6 insertions
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
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
On 2018-10-25 16:17, Sasha Levin wrote:
> From: Rasmus Villemoes
>
> [ Upstream commit e87c3f80ad0490d26ffe04754b7d094463b40f30 ]
>
> !strncmp(buf, "force host", 9) is true if and only if buf starts with
> "force hos". This was obviously not what was intend
about the state of close_on_exec in the new
bits when we expand the fdtable, we don't need to clear close_on_exec[i]
in do_close_on_exec, and since we may have quite a few bits set in
close_on_exec[i] without an actual open file, mask the set with
open_fds[i].
Signed-off-by: Rasmus Villemoe
orted.
Reviewed-by: Bryan O'Donoghue
Signed-off-by: Rasmus Villemoes
---
Sending as a proper patch. Marked v2 since this replaces earlier 2/3
and 3/3 patches. Applies on top of
b4fc4e8340784e30c5a59bf0791f9c3ce15e (staging: greybus:
loopback.c: remove unused gb_loopback::lbid).
drive
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.
>
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
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 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
601 - 700 of 1756 matches
Mail list logo