* [PATCH v2] kasan: Respect /proc/sys/kernel/traceoff_on_warning
[not found] <20170125142524.GQ6515@twins.programming.kicks-ass.net>
@ 2017-01-25 16:41 ` Andrey Ryabinin
0 siblings, 0 replies; only message in thread
From: Andrey Ryabinin @ 2017-01-25 16:41 UTC (permalink / raw)
To: Andrew Morton
Cc: Alexander Potapenko, linux-mm, linux-kernel, Peter Zijlstra,
Dmitry Vyukov, Steven Rostedt, Andrey Ryabinin
From: Peter Zijlstra <peterz@infradead.org>
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) <peterz@infradead.org>
Acked-by: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
mm/kasan/report.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index b82b3e2..f479365 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -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, size_t size,
if (likely(!kasan_report_enabled()))
return;
+ disable_trace_on_warning();
+
info.access_addr = (void *)addr;
info.access_size = size;
info.is_write = is_write;
--
2.10.2
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-25 16:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20170125142524.GQ6515@twins.programming.kicks-ass.net>
2017-01-25 16:41 ` [PATCH v2] kasan: Respect /proc/sys/kernel/traceoff_on_warning Andrey Ryabinin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox