linux/kernel/kcsan
Marco Elver f5d2313bd3 kcsan, trace: Make KCSAN compatible with tracing
Previously the system would lock up if ftrace was enabled together with
KCSAN. This is due to recursion on reporting if the tracer code is
instrumented with KCSAN.

To avoid this for all types of tracing, disable KCSAN instrumentation
for all of kernel/trace.

Furthermore, since KCSAN relies on udelay() to introduce delay, we have
to disable ftrace for udelay() (currently done for x86) in case KCSAN is
used together with lockdep and ftrace. The reason is that it may corrupt
lockdep IRQ flags tracing state due to a peculiar case of recursion
(details in Makefile comment).

Reported-by: Qian Cai <cai@lca.pw>
Tested-by: Qian Cai <cai@lca.pw>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2020-03-21 09:44:41 +01:00
..
atomic.h kcsan: Prefer __always_inline for fast-path 2020-03-21 09:40:19 +01:00
core.c kcsan: Add kcsan_set_access_mask() support 2020-03-21 09:44:08 +01:00
debugfs.c kcsan: Introduce ASSERT_EXCLUSIVE_BITS(var, mask) 2020-03-21 09:44:14 +01:00
encoding.h kcsan: Prefer __always_inline for fast-path 2020-03-21 09:40:19 +01:00
kcsan.h kcsan: Add kcsan_set_access_mask() support 2020-03-21 09:44:08 +01:00
Makefile kcsan, trace: Make KCSAN compatible with tracing 2020-03-21 09:44:41 +01:00
report.c kcsan: Add kcsan_set_access_mask() support 2020-03-21 09:44:08 +01:00
test.c kcsan: Fix 0-sized checks 2020-03-21 09:42:42 +01:00