diff options
| author | Bradley Morgan <brads@mainlining.org> | 2026-09-16 18:29:57 +0000 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-06 19:03:10 -0700 |
| commit | 56de113da14706d6a1b28648e9ff5c261f536201 (patch) | |
| tree | 370df771749d91c96ef0fda4d9fd26385858c09e /scripts/checkstack.pl | |
| parent | 9e3a9fd1f684bd59b70ced64b6709c11e13bd4c7 (diff) | |
| download | linux-next-56de113da14706d6a1b28648e9ff5c261f536201.tar.gz linux-next-56de113da14706d6a1b28648e9ff5c261f536201.zip | |
panic: kill the "buffer unavailable" redirect fallback
The redirect buffer is a disgusting terrible hack. panic_force_buf is
kmalloc'ed in a late_initcall, and until then the redirect delivers this
as the panic message:
Redirected panic (buffer unavailable)
The whole point of the redirect is to hand the panic message to the target
CPU, so the crash kernel boots knowing it panicked and not why. And that
window is the entire boot, from the early_param to the late_initcall,
which is exactly when you most want the message.
Make it a static 1KB buffer and kill the initcall. The cost is 1KB of
.bss in SMP crash dump builds, and it is only ever touched when
panic_force_cpu= is set anyway. The local msg variable is gone too, the
buffer goes directly to panic_smp_redirect_cpu().
Link: https://lore.kernel.org/20260916182957.7788-7-brads@mainlining.org
Signed-off-by: Bradley Morgan <brads@mainlining.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Suggested-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Cc: Guenetr Roeck <linux@roeck-us.net>
Cc: Sashiko <sashiko-bot@kernel.org>
Cc: Wang Jinchao <wangjinchao600@gmail.com>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: <stable@vger.kernel.org>
Diffstat (limited to 'scripts/checkstack.pl')
0 files changed, 0 insertions, 0 deletions
