Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: remove CONFIG_VMAP_STACK conditionals from traps overflow stack

With VMAP_STACK now always enabled on arm64, remove the
CONFIG_VMAP_STACK checks from overflow stack definitions and related
code in arch/arm64/kernel/traps.c. The overflow_stack and
panic_bad_stack() logic are now unconditionally included, simplifying
the source and matching the mandatory stack model.

Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20250707-arm64_vmap-v1-5-8de98ca0f91c@debian.org
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Breno Leitao and committed by
Will Deacon
e5692bba c4a5699d

-3
-3
arch/arm64/kernel/traps.c
··· 894 894 "Bad EL0 synchronous exception"); 895 895 } 896 896 897 - #ifdef CONFIG_VMAP_STACK 898 - 899 897 DEFINE_PER_CPU(unsigned long [OVERFLOW_STACK_SIZE/sizeof(long)], overflow_stack) 900 898 __aligned(16); 901 899 ··· 925 927 nmi_panic(NULL, "kernel stack overflow"); 926 928 cpu_park_loop(); 927 929 } 928 - #endif 929 930 930 931 void __noreturn arm64_serror_panic(struct pt_regs *regs, unsigned long esr) 931 932 {