Skip to content

Commit 61d56d7

Browse files
melverpaulmckrcu
authored andcommitted
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 <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 2839a23 commit 61d56d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/kcsan/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CFLAGS_REMOVE_debugfs.o = $(CC_FLAGS_FTRACE)
88
CFLAGS_REMOVE_report.o = $(CC_FLAGS_FTRACE)
99

1010
CFLAGS_core.o := $(call cc-option,-fno-conserve-stack) \
11-
-fno-stack-protector
11+
-fno-stack-protector -DDISABLE_BRANCH_PROFILING
1212

1313
obj-y := core.o debugfs.o report.o
1414
obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o

0 commit comments

Comments
 (0)