summaryrefslogtreecommitdiff
path: root/kernel/kcsan
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2020-06-18 11:31:18 +0200
committerPaul E. McKenney <paulmck@kernel.org>2020-06-29 12:04:48 -0700
commit61d56d7aa5eca3b909bce51ba8125b0fa44d7e17 (patch)
treed3bf5b8c4209bbe7212524bf01418ea0b0c3d215 /kernel/kcsan
parent2839a232071f588d334543fb86f5689b43353842 (diff)
kcsan: Disable branch tracing in core runtime
Disable branch tracing in core KCSAN runtime if branches are being traced (TRACE_BRANCH_PROFILING). This it to avoid its performance impact, but also avoid recursion in case KCSAN is enabled for the branch tracing runtime. The latter had already been a problem for KASAN: https://lore.kernel.org/lkml/CANpmjNOeXmD5E3O50Z3MjkiuCYaYOPyi+1rq=GZvEKwBvLR0Ug@mail.gmail.com/ Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/kcsan')
-rw-r--r--kernel/kcsan/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kcsan/Makefile b/kernel/kcsan/Makefile
index fea064afc4f7..65ca5539c470 100644
--- a/kernel/kcsan/Makefile
+++ b/kernel/kcsan/Makefile
@@ -8,7 +8,7 @@ CFLAGS_REMOVE_debugfs.o = $(CC_FLAGS_FTRACE)
CFLAGS_REMOVE_report.o = $(CC_FLAGS_FTRACE)
CFLAGS_core.o := $(call cc-option,-fno-conserve-stack) \
- -fno-stack-protector
+ -fno-stack-protector -DDISABLE_BRANCH_PROFILING
obj-y := core.o debugfs.o report.o
obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o