diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-09-15 17:12:59 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-09-21 13:57:43 +0200 |
commit | 44b979fa302cab91bdd2cc982823e5c13202cd4e (patch) | |
tree | 95cda92efb3adb9b44d233dbd979e3ecfd9fa66e /arch/x86/include/asm/traps.h | |
parent | x86/iopl: Fake iopl(3) CLI/STI usage (diff) | |
download | linux-44b979fa302cab91bdd2cc982823e5c13202cd4e.tar.xz linux-44b979fa302cab91bdd2cc982823e5c13202cd4e.zip |
x86/mm/64: Improve stack overflow warnings
Current code has an explicit check for hitting the task stack guard;
but overflowing any of the other stacks will get you a non-descript
general #DF warning.
Improve matters by using get_stack_info_noinstr() to detetrmine if and
which stack guard page got hit, enabling a better stack warning.
In specific, Michael Wang reported what turned out to be an NMI
exception stack overflow, which is now clearly reported as such:
[] BUG: NMI stack guard page was hit at 0000000085fd977b (stack is 000000003a55b09e..00000000d8cce1a5)
Reported-by: Michael Wang <yun.wang@linux.alibaba.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Wang <yun.wang@linux.alibaba.com>
Link: https://lkml.kernel.org/r/YUTE/NuqnaWbST8n@hirez.programming.kicks-ass.net
Diffstat (limited to 'arch/x86/include/asm/traps.h')
-rw-r--r-- | arch/x86/include/asm/traps.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h index 7f7200021bd1..6221be7cafc3 100644 --- a/arch/x86/include/asm/traps.h +++ b/arch/x86/include/asm/traps.h @@ -40,9 +40,9 @@ void math_emulate(struct math_emu_info *); bool fault_in_kernel_space(unsigned long address); #ifdef CONFIG_VMAP_STACK -void __noreturn handle_stack_overflow(const char *message, - struct pt_regs *regs, - unsigned long fault_address); +void __noreturn handle_stack_overflow(struct pt_regs *regs, + unsigned long fault_address, + struct stack_info *info); #endif #endif /* _ASM_X86_TRAPS_H */ |