diff options
| author | Brian Gerst <brgerst@gmail.com> | 2025-03-03 12:01:15 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2025-03-03 20:30:09 +0100 |
| commit | 604ea3e90b17f27928a64d86259c57710c254438 (patch) | |
| tree | 1e4d7577e5775d034d0c8bf10ed2112a9736d4de /arch/x86/kernel/reboot.c | |
| parent | 399fd7a26441586021ca3722f6a98ff33ed32caf (diff) | |
x86/smp/32: Remove safe_smp_processor_id()
The safe_smp_processor_id() function was originally implemented in:
dc2bc768a009 ("stack overflow safe kdump: safe_smp_processor_id()")
to mitigate the CPU number corruption on a stack overflow. At the time,
x86-32 stored the CPU number in thread_struct, which was located at the
bottom of the task stack and thus vulnerable to an overflow.
The CPU number is now located in percpu memory, so this workaround
is no longer needed.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Uros Bizjak <ubizjak@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://lore.kernel.org/r/20250303170115.2176553-1-brgerst@gmail.com
Diffstat (limited to 'arch/x86/kernel/reboot.c')
| -rw-r--r-- | arch/x86/kernel/reboot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 9aaac1f9f45b..964f6b0a3d68 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -921,7 +921,7 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback) return; /* Make a note of crashing cpu. Will be used in NMI callback. */ - crashing_cpu = safe_smp_processor_id(); + crashing_cpu = smp_processor_id(); shootdown_callback = callback; |
