Re: [PATCH v2] x86,mm: print likely CPU at segfault time

From: Ingo Molnar
Date: Fri Aug 05 2022 - 03:59:39 EST



* Rik van Riel <riel@xxxxxxxxxxx> wrote:

> The show_unhandled_signals variable seems to be controlled through
> /proc/sys/debug/exception-trace, and be on by default.

Indeed ... then this too should be pointed out in the changelog.

Plus the patch doesn't build on top of the latest upstream kernel,
x86-defconfig:

CC arch/x86/mm/fault.o
In file included from ./arch/x86/include/generated/asm/rwonce.h:1,
from ./include/linux/compiler.h:248,
from ./arch/x86/include/asm/current.h:5,
from ./include/linux/sched.h:12,
from arch/x86/mm/fault.c:7:
arch/x86/mm/fault.c: In function ‘show_signal_msg’:
./include/asm-generic/rwonce.h:44:71: error: lvalue required as unary ‘&’ operand
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
./include/asm-generic/rwonce.h:50:9: note: in expansion of macro ‘__READ_ONCE’
50 | __READ_ONCE(x); \
| ^~~~~~~~~~~
arch/x86/mm/fault.c:773:19: note: in expansion of macro ‘READ_ONCE’
773 | int cpu = READ_ONCE(raw_smp_processor_id());
| ^~~~~~~~~
make[2]: *** [scripts/Makefile.build:249: arch/x86/mm/fault.o] Error 1

Thanks,

Ingo