]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/smp/32: Remove safe_smp_processor_id()
authorBrian Gerst <brgerst@gmail.com>
Mon, 3 Mar 2025 17:01:15 +0000 (12:01 -0500)
committerIngo Molnar <mingo@kernel.org>
Mon, 3 Mar 2025 19:30:09 +0000 (20:30 +0100)
commit604ea3e90b17f27928a64d86259c57710c254438
tree1e4d7577e5775d034d0c8bf10ed2112a9736d4de
parent399fd7a26441586021ca3722f6a98ff33ed32caf
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
arch/x86/include/asm/cpu.h
arch/x86/include/asm/smp.h
arch/x86/kernel/apic/ipi.c
arch/x86/kernel/crash.c
arch/x86/kernel/reboot.c