Skip to contentSkip to conversation

panic: drop the fake trace id from the oops end marker

PATCH In review Bradley Morgan 2 participants 4 messages Oct 4 – Oct 19

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 panic: drop the fake trace id from the oops end marker

print_oops_end_marker() prints "---[ end trace 0000000000000000 ]---". The format pretends each oops has a trace id, but the value has been a hardcoded 0 since the oops id machinery was removed, and nothing prints an opening marker anymore. Nothing in tree parses the id either, the pstore selftest greps for "---[ end trace" without it. Kill the fake id, the format specifier and the 0ULL argument go with it.

---
 kernel/panic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/panic.c +1 -1
index 213725b612aa..0436a92318ed 100644
@@ -1051,7 +1051,7 @@ void oops_enter(void)
 
 static void print_oops_end_marker(void)
 {
-	pr_warn("---[ end trace %016llx ]---\n", 0ULL);
+	pr_warn("---[ end trace ]---\n");
 }
 
 /*
Signature · 1 line
2.53.0
#1 lore raw
Quoted 7 lines · Bradley Morgan

print_oops_end_marker() prints "---[ end trace 0000000000000000 ]---". The format pretends each oops has a trace id, but the value has been a hardcoded 0 since the oops id machinery was removed, and nothing prints an opening marker anymore. Nothing in tree parses the id either, the pstore selftest greps for "---[ end trace" without it. Kill the fake id, the format specifier and the 0ULL argument go with it.

Could you please figure out _why_ it is hardcoded to 0? Someone requested this with a reason. If you want to remove it, you need to ensure that reason is no longer valid.

Quoted 10 lines
---
 kernel/panic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/panic.c +0 -0
index 213725b612aa..0436a92318ed 100644

kernel/panic.c void oops_enter(void) · line 1057

Quoted 8 lines
kernel/panic.c +1 -1
@@ -1051,7 +1051,7 @@ void oops_enter(void)
 
 static void print_oops_end_marker(void)
 {
-	pr_warn("---[ end trace %016llx ]---\n", 0ULL);
+	pr_warn("---[ end trace ]---\n");
 }
 
 /*

Sebastian

#2 lore raw
Quoted 9 lines · Sebastian Andrzej Siewior
Quoted 7 lines · Bradley Morgan

print_oops_end_marker() prints "---[ end trace 0000000000000000 ]---". The format pretends each oops has a trace id, but the value has been a hardcoded 0 since the oops id machinery was removed, and nothing prints an opening marker anymore. Nothing in tree parses the id either, the pstore selftest greps for "---[ end trace" without it. Kill the fake id, the format specifier and the 0ULL argument go with it.

Quoted 3 lines

Could you please figure out _why_ it is hardcoded to 0? Someone requested this with a reason. If you want to remove it, you need to ensure that reason is no longer valid.

Nice catch!

uhhh, well it's just always been there I'd assume. Probably for selftests?

But what's exactly the "benefit" of this? Idk.

Quoted 18 lines
Quoted 18 lines
---
 kernel/panic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/panic.c +1 -1
index 213725b612aa..0436a92318ed 100644
@@ -1051,7 +1051,7 @@ void oops_enter(void)
 
 static void print_oops_end_marker(void)
 {
-	pr_warn("---[ end trace %016llx ]---\n", 0ULL);
+	pr_warn("---[ end trace ]---\n");
 }
 
Quoted 3 lines

kernel/panic.c void oops_enter(void) · line 1057

Quoted 1 line
kernel/panic.c +0 -0
 /*

Sebastian

--- Thanks!
"I'm not a very positive person" - Linus torvalds

#3 lore raw
Quoted 15 lines · Bradley Morgan
Quoted 9 lines · Sebastian Andrzej Siewior
Quoted 7 lines · Bradley Morgan

print_oops_end_marker() prints "---[ end trace 0000000000000000 ]---". The format pretends each oops has a trace id, but the value has been a hardcoded 0 since the oops id machinery was removed, and nothing prints an opening marker anymore. Nothing in tree parses the id either, the pstore selftest greps for "---[ end trace" without it. Kill the fake id, the format specifier and the 0ULL argument go with it.

Quoted 3 lines

Could you please figure out _why_ it is hardcoded to 0? Someone requested this with a reason. If you want to remove it, you need to ensure that reason is no longer valid.

Quoted 5 lines

Nice catch!

uhhh, well it's just always been there I'd assume. Probably for selftests?

But what's exactly the "benefit" of this? Idk.

Once you figured out why something is the way it is you could make change it argue that the old reason is longer valid because of …

You did not do it. You simply said remove the 0 because we have in-tree users. At best.

Sebastian