]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/traps: Print unhashed pointers on stack overflow
authorRyosuke Yasuoka <ryasuoka@redhat.com>
Wed, 24 Dec 2025 07:07:32 +0000 (16:07 +0900)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 14 Jan 2026 15:31:53 +0000 (16:31 +0100)
When a stack overflow occurs, the kernel prints hashed fault address and the
stack range using %p. The actual addresses are required for debugging and
hashed pointers provide no useful information in this context.

Use %px to print the unhashed, raw addresses.

Signed-off-by: Ryosuke Yasuoka <ryasuoka@redhat.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20251224070735.454816-1-ryasuoka@redhat.com
arch/x86/kernel/traps.c

index bcf1dedc1d008e63a2e5449a23e8dc9c9940fb69..5a6a772e0a6c66b501a27f30e8e229aaef5ee261 100644 (file)
@@ -549,7 +549,7 @@ __visible void __noreturn handle_stack_overflow(struct pt_regs *regs,
 {
        const char *name = stack_type_name(info->type);
 
-       printk(KERN_EMERG "BUG: %s stack guard page was hit at %p (stack is %p..%p)\n",
+       printk(KERN_EMERG "BUG: %s stack guard page was hit at %px (stack is %px..%px)\n",
               name, (void *)fault_address, info->begin, info->end);
 
        die("stack guard page", regs, 0);