Commit 6b32c935 authored by Ryosuke Yasuoka's avatar Ryosuke Yasuoka Committed by Borislav Petkov (AMD)
Browse files

x86/traps: Print unhashed pointers on stack overflow



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: default avatarRyosuke Yasuoka <ryasuoka@redhat.com>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20251224070735.454816-1-ryasuoka@redhat.com
parent 6b45ded3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);