Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Borislav Petkov (AMD) and committed by
Andrew Morton
ffda6556 250ae189

+3 -4
+3 -4
lib/ubsan.c
··· 204 204 { 205 205 current->in_ubsan++; 206 206 207 - pr_err("========================================" 208 - "========================================\n"); 207 + pr_warn(CUT_HERE); 208 + 209 209 pr_err("UBSAN: %s in %s:%d:%d\n", reason, loc->file_name, 210 210 loc->line & LINE_MASK, loc->column & COLUMN_MASK); 211 211 ··· 215 215 static void ubsan_epilogue(void) 216 216 { 217 217 dump_stack(); 218 - pr_err("========================================" 219 - "========================================\n"); 218 + pr_warn("---[ end trace ]---\n"); 220 219 221 220 current->in_ubsan--; 222 221