[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20231218135339.23209-1-bp@alien8.de>
Date: Mon, 18 Dec 2023 14:53:39 +0100
From: Borislav Petkov <bp@...en8.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Andrey Ryabinin <ryabinin.a.a@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH] UBSAN: Use the kernel panic message markers
From: "Borislav Petkov (AMD)" <bp@...en8.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@...en8.de>
Cc: Andrey Ryabinin <ryabinin.a.a@...il.com>
Cc: Andrew Morton <akpm@...ux-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
Powered by blists - more mailing lists