kasan: respect /proc/sys/kernel/traceoff_on_warning
Subsystems (2)
[email protected]
maintainerPATCH 2/8 kasan: respect /proc/sys/kernel/traceoff_on_warning
From: Peter Zijlstra <[email protected]>
Subject: kasan: respect /proc/sys/kernel/traceoff_on_warning
After much waiting I finally reproduced a KASAN issue, only to find my trace-buffer empty of useful information because it got spooled out :/
Make kasan_report honour the /proc/sys/kernel/traceoff_on_warning interface.
Signed-off-by Peter Zijlstra (Intel) <[email protected]>
Signed-off-by Andrey Ryabinin <[email protected]>
Cc Dmitry Vyukov <[email protected]>
Cc Steven Rostedt <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/kasan/report.c | 3 +++ 1 file changed, 3 insertions(+)
mm/kasan/report.c renamed from mm/kasan/report.c~kasan-respect-proc-sys-kernel-traceoff_on_warning +3 -0
@@ -13,6 +13,7 @@* */ +#include <linux/ftrace.h> #include <linux/kernel.h> #include <linux/mm.h> #include <linux/printk.h>
@@ -300,6 +301,8 @@ void kasan_report(unsigned long addr, siif (likely (!kasan_report_enabled ()))return ; +disable_trace_on_warning (); + info.access_addr = (void *)addr; info.access_size = size; info.is_write = is_write;
_