[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200618093118.247375-4-elver@google.com>
Date: Thu, 18 Jun 2020 11:31:18 +0200
From: Marco Elver <elver@...gle.com>
To: elver@...gle.com, paulmck@...nel.org
Cc: will@...nel.org, peterz@...radead.org, bp@...en8.de,
tglx@...utronix.de, mingo@...nel.org, dvyukov@...gle.com,
cai@....pw, kasan-dev@...glegroups.com,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] 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@...gle.com>
---
kernel/kcsan/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.27.0.290.gba653c62da-goog
Powered by blists - more mailing lists