mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
61d56d7aa5
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>
18 lines
522 B
Makefile
18 lines
522 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
KCSAN_SANITIZE := n
|
|
KCOV_INSTRUMENT := n
|
|
UBSAN_SANITIZE := n
|
|
|
|
CFLAGS_REMOVE_core.o = $(CC_FLAGS_FTRACE)
|
|
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 -DDISABLE_BRANCH_PROFILING
|
|
|
|
obj-y := core.o debugfs.o report.o
|
|
obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o
|
|
|
|
CFLAGS_kcsan-test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer
|
|
obj-$(CONFIG_KCSAN_TEST) += kcsan-test.o
|