diff options
author | Borislav Petkov (AMD) <bp@alien8.de> | 2023-12-18 14:53:39 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-12-20 14:48:14 -0800 |
commit | ffda65568249f5388ed68fd15a6d96f1f496a425 (patch) | |
tree | e6ea4ea221a5633992ae0f3dda1598a0dd3a984a | |
parent | 250ae189d98290d0539b4f9b8c4703e0bf24f9d3 (diff) | |
download | linux-stable-ffda65568249f5388ed68fd15a6d96f1f496a425.tar.gz linux-stable-ffda65568249f5388ed68fd15a6d96f1f496a425.tar.bz2 linux-stable-ffda65568249f5388ed68fd15a6d96f1f496a425.zip |
UBSAN: use the kernel panic message markers
Use the same splat markers as panic does for easier matching by external
tools scanning kernel dmesg for splats.
Link: https://lkml.kernel.org/r/20231218135339.23209-1-bp@alien8.de
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | lib/ubsan.c | 7 |
1 files 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--; |