From: Marco Elver <elver@google.com>
To: elver@google.com, paulmck@kernel.org
Cc: will@kernel.org, peterz@infradead.org, bp@alien8.de,
tglx@linutronix.de, mingo@kernel.org, dvyukov@google.com,
cai@lca.pw, kasan-dev@googlegroups.com,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] kcsan: Disable branch tracing in core runtime
Date: Thu, 18 Jun 2020 11:31:18 +0200 [thread overview]
Message-ID: <20200618093118.247375-4-elver@google.com> (raw)
In-Reply-To: <20200618093118.247375-1-elver@google.com>
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>
---
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
next prev parent reply other threads:[~2020-06-18 9:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-18 9:31 [PATCH 0/3] kcsan: Re-add GCC support, and compiler flags improvements Marco Elver
2020-06-18 9:31 ` [PATCH 1/3] kcsan: Re-add GCC as a supported compiler Marco Elver
2020-06-18 9:31 ` [PATCH 2/3] kcsan: Simplify compiler flags Marco Elver
2020-06-18 9:31 ` Marco Elver [this message]
2020-06-19 3:25 ` [PATCH 0/3] kcsan: Re-add GCC support, and compiler flags improvements Paul E. McKenney
2020-06-19 21:49 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200618093118.247375-4-elver@google.com \
--to=elver@google.com \
--cc=bp@alien8.de \
--cc=cai@lca.pw \
--cc=dvyukov@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®