Skip to contentSkip to conversation

x86/dumpstack: uniform die messages prompt

PATCH Applied [email protected] 2 participants 2 messages Mar 27, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 x86/dumpstack: uniform die messages prompt

From: Alex Shi <[email protected]>

panic() has a uniform prompt, like "Kernel panic - not syncing:". That's easy to indicate a panic there. But die() message doesn't have.

We died thousands machine with very different reasons weekly. w/o a prompt in dmesg, it's hard to write scripts to collect and anaylis the die reasons. That makes admins' life pretty hard.

A uniform die() prompt like "Oops:" could save some hair for admins.

To: [email protected]
To: "H. Peter Anvin" <[email protected]>
To: [email protected]
To: Dave Hansen <[email protected]>
To: Borislav Petkov <[email protected]>
To: Ingo Molnar <[email protected]>
To: Thomas Gleixner <[email protected]>
To: Peter Zijlstra <[email protected]>
To: Josh Poimboeuf <[email protected]>

---
 arch/x86/kernel/dumpstack.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/dumpstack.c +2 -2
index f18ca44c904b..e1358ef80b59 100644
@@ -405,8 +405,8 @@ static void __die_header(const char *str, struct pt_regs *regs, long err)
 		pr = IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT";
 
 	printk(KERN_DEFAULT
-	       "%s: %04lx [#%d]%s%s%s%s%s\n", str, err & 0xffff, ++die_counter,
-	       pr,
+	       "Oops: %s: %04lx [#%d]%s%s%s%s%s\n", str, err & 0xffff,
+	       ++die_counter, pr,
 	       IS_ENABLED(CONFIG_SMP)     ? " SMP"             : "",
 	       debug_pagealloc_enabled()  ? " DEBUG_PAGEALLOC" : "",
 	       IS_ENABLED(CONFIG_KASAN)   ? " KASAN"           : "",
Signature · 1 line
2.43.0
merge bot Applied
#1 lore raw

[tip: x86/bugs] x86/dumpstack: Use uniform "Oops: " prefix for die() messages

The following commit has been merged into the x86/bugs branch of tip:

The following commit has been merged into the x86/bugs branch of tip:

Commit-ID:     f9f62a877da1e6f6e9d58bd779c1c77052eb04ab
Gitweb:        https://git.kernel.org/tip/f9f62a877da1e6f6e9d58bd779c1c77052eb04ab
Author:        Alex Shi <[email protected]>
AuthorDate:    Wed, 27 Mar 2024 10:44:19 +08:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Wed, 27 Mar 2024 08:45:19 +01:00

x86/dumpstack: Use uniform "Oops: " prefix for die() messages

panic() prints a uniform prompt: "Kernel panic - not syncing:", but die() messages don't have any of that, the message is the raw user-defined message with no prefix.

There's companies that collect thousands of die() messages per week, but w/o a prompt in dmesg, it's hard to write scripts to collect and analize the reasons.

Add a uniform "Oops:" prefix like other architectures.

[ mingo: Rewrote changelog. ]

---
 arch/x86/kernel/dumpstack.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/dumpstack.c +2 -2
index 44a91ef..a7d5626 100644
@@ -405,8 +405,8 @@ static void __die_header(const char *str, struct pt_regs *regs, long err)
 		pr = IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT";
 
 	printk(KERN_DEFAULT
-	       "%s: %04lx [#%d]%s%s%s%s%s\n", str, err & 0xffff, ++die_counter,
-	       pr,
+	       "Oops: %s: %04lx [#%d]%s%s%s%s%s\n", str, err & 0xffff,
+	       ++die_counter, pr,
 	       IS_ENABLED(CONFIG_SMP)     ? " SMP"             : "",
 	       debug_pagealloc_enabled()  ? " DEBUG_PAGEALLOC" : "",
 	       IS_ENABLED(CONFIG_KASAN)   ? " KASAN"           : "",