Skip to contentSkip to conversation

Patch "kasan: respect /proc/sys/kernel/traceoff_on_warning" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Jun 15, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

kasan: respect /proc/sys/kernel/traceoff_on_warning

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
kasan-respect-proc-sys-kernel-traceoff_on_warning.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Jun 15 11:39:37 CEST 2017

From: Peter Zijlstra <[email protected]>
Date: Tue, 23 May 2017 21:53:57 -0400
Subject: kasan: respect /proc/sys/kernel/traceoff_on_warning

From: Peter Zijlstra <[email protected]>

[ Upstream commit 4f40c6e5627ea73b4e7c615c59631f38cc880885 ]

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.

---
 mm/kasan/report.c |    3 +++
 1 file changed, 3 insertions(+)
mm/kasan/report.c +3 -0
@@ -13,6 +13,7 @@
  *
  */
 
+#include <linux/ftrace.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/printk.h>
@@ -251,6 +252,8 @@ void kasan_report(unsigned long addr, si
 	if (likely(!kasan_report_enabled()))
 		return;
 
+	disable_trace_on_warning();
+
 	info.access_addr = (void *)addr;
 	info.access_size = size;
 	info.is_write = is_write;

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/kasan-respect-proc-sys-kernel-traceoff_on_warning.patch