mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] UBSAN: Use the kernel panic message markers
@ 2023-12-18 13:53 Borislav Petkov
  0 siblings, 0 replies; only message in thread
From: Borislav Petkov @ 2023-12-18 13:53 UTC (permalink / raw)
  To: LKML; +Cc: Andrey Ryabinin, Andrew Morton

From: "Borislav Petkov (AMD)" <bp@alien8.de>

Use the same splat markers as panic does for easier matching by external
tools scanning kernel dmesg for splats.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 lib/ubsan.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/ubsan.c b/lib/ubsan.c
index 3f90810f9f42..df4f8d1354bb 100644
--- a/lib/ubsan.c
+++ b/lib/ubsan.c
@@ -204,8 +204,8 @@ static void ubsan_prologue(struct source_location *loc, const char *reason)
 {
 	current->in_ubsan++;
 
-	pr_err("========================================"
-		"========================================\n");
+	pr_warn(CUT_HERE);
+
 	pr_err("UBSAN: %s in %s:%d:%d\n", reason, loc->file_name,
 		loc->line & LINE_MASK, loc->column & COLUMN_MASK);
 
@@ -215,8 +215,7 @@ static void ubsan_prologue(struct source_location *loc, const char *reason)
 static void ubsan_epilogue(void)
 {
 	dump_stack();
-	pr_err("========================================"
-		"========================================\n");
+	pr_warn("---[ end trace ]---\n");
 
 	current->in_ubsan--;
 
-- 
2.42.0.rc0.25.ga82fb66fed25


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-18 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-18 13:53 [PATCH] UBSAN: Use the kernel panic message markers Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®