]> www.infradead.org Git - users/jedix/linux-maple.git/commit
printk/panic: Add option to allow non-panic CPUs to write to the ring buffer.
authorDonghyeok Choe <d7271.choe@samsung.com>
Tue, 18 Mar 2025 02:23:20 +0000 (11:23 +0900)
committerPetr Mladek <pmladek@suse.com>
Thu, 20 Mar 2025 14:48:36 +0000 (15:48 +0100)
commitc1aa3daa517292303d98ff61f0440c354669f948
tree01fc3b28e2e1ac7a68c3f5ead9229252ceaba96d
parent2f1f7787b6b8648f3ceefc59192489052644c6c7
printk/panic: Add option to allow non-panic CPUs to write to the ring buffer.

Commit 779dbc2e78d7 ("printk: Avoid non-panic CPUs writing to ringbuffer")
aimed to isolate panic-related messages. However, when panic() itself
malfunctions, messages from non-panic CPUs become crucial for debugging.

While commit bcc954c6caba ("printk/panic: Allow cpu backtraces to
be written into ringbuffer during panic") enables non-panic CPU
backtraces, it may not provide sufficient diagnostic information.

Introduce the "debug_non_panic_cpus" command-line option, enabling
non-panic CPU messages to be stored in the ring buffer during a panic.
This also prevents discarding non-finalized messages from non-panic CPUs
during console flushing, providing a more comprehensive view of system
state during critical failures.

Link: https://lore.kernel.org/all/Z8cLEkqLL2IOyNIj@pathway/
Signed-off-by: Donghyeok Choe <d7271.choe@samsung.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20250318022320.2428155-1-d7271.choe@samsung.com
[pmladek@suse.com: Added documentation, added module_parameter, removed printk_ prefix.]
Tested-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Documentation/admin-guide/kernel-parameters.txt
kernel/printk/internal.h
kernel/printk/printk.c
kernel/printk/printk_ringbuffer.c