* [PATCH] x86/traps: Print unhashed pointers on stack overflow
@ 2025-12-24 7:07 Ryosuke Yasuoka
2026-01-14 6:58 ` Ryosuke Yasuoka
2026-01-14 16:16 ` [tip: x86/misc] " tip-bot2 for Ryosuke Yasuoka
0 siblings, 2 replies; 3+ messages in thread
From: Ryosuke Yasuoka @ 2025-12-24 7:07 UTC (permalink / raw)
To: tglx, mingo, bp, dave.hansen, hpa; +Cc: Ryosuke Yasuoka, x86, linux-kernel
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>
---
arch/x86/kernel/traps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index bcf1dedc1d00..5a6a772e0a6c 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -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);
base-commit: b927546677c876e26eba308550207c2ddf812a43
--
2.52.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/traps: Print unhashed pointers on stack overflow
2025-12-24 7:07 [PATCH] x86/traps: Print unhashed pointers on stack overflow Ryosuke Yasuoka
@ 2026-01-14 6:58 ` Ryosuke Yasuoka
2026-01-14 16:16 ` [tip: x86/misc] " tip-bot2 for Ryosuke Yasuoka
1 sibling, 0 replies; 3+ messages in thread
From: Ryosuke Yasuoka @ 2026-01-14 6:58 UTC (permalink / raw)
To: tglx, mingo, bp, dave.hansen, hpa; +Cc: x86, linux-kernel
On Wed, Dec 24, 2025 at 04:07:32PM +0900, Ryosuke Yasuoka wrote:
> 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>
> ---
> arch/x86/kernel/traps.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> index bcf1dedc1d00..5a6a772e0a6c 100644
> --- a/arch/x86/kernel/traps.c
> +++ b/arch/x86/kernel/traps.c
> @@ -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);
>
> base-commit: b927546677c876e26eba308550207c2ddf812a43
> --
> 2.52.0
>
Hi all,
It's just a gentle ping on this patch.
Please let me know if there are any changes required. Any feedbacks are
welcome.
Thank you
Ryosuke
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip: x86/misc] x86/traps: Print unhashed pointers on stack overflow
2025-12-24 7:07 [PATCH] x86/traps: Print unhashed pointers on stack overflow Ryosuke Yasuoka
2026-01-14 6:58 ` Ryosuke Yasuoka
@ 2026-01-14 16:16 ` tip-bot2 for Ryosuke Yasuoka
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Ryosuke Yasuoka @ 2026-01-14 16:16 UTC (permalink / raw)
To: linux-tip-commits
Cc: Ryosuke Yasuoka, Borislav Petkov (AMD), x86, linux-kernel
The following commit has been merged into the x86/misc branch of tip:
Commit-ID: 6b32c93560cb194e10279bd3be3c1d0fa30df3e7
Gitweb: https://git.kernel.org/tip/6b32c93560cb194e10279bd3be3c1d0fa30df3e7
Author: Ryosuke Yasuoka <ryasuoka@redhat.com>
AuthorDate: Wed, 24 Dec 2025 16:07:32 +09:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Wed, 14 Jan 2026 16:31:53 +01:00
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: 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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index bcf1ded..5a6a772 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-14 16:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-24 7:07 [PATCH] x86/traps: Print unhashed pointers on stack overflow Ryosuke Yasuoka
2026-01-14 6:58 ` Ryosuke Yasuoka
2026-01-14 16:16 ` [tip: x86/misc] " tip-bot2 for Ryosuke Yasuoka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox