summaryrefslogtreecommitdiffstats
path: root/lib/Kconfig.kcsan
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2020-07-24 09:00:05 +0200
committerPaul E. McKenney <paulmck@kernel.org>2020-08-25 00:09:58 +0200
commitbec4a2474890a6884eb890c778ea02bccaaae6eb (patch)
treec503cb543a991b2812869b57821273398ffe8804 /lib/Kconfig.kcsan
parentkcsan: Add missing CONFIG_KCSAN_IGNORE_ATOMICS checks (diff)
downloadlinux-bec4a2474890a6884eb890c778ea02bccaaae6eb.tar.xz
linux-bec4a2474890a6884eb890c778ea02bccaaae6eb.zip
kcsan: Test support for compound instrumentation
Changes kcsan-test module to support checking reports that include compound instrumentation. Since we should not fail the test if this support is unavailable, we have to add a config variable that the test can use to decide what to check for. Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'lib/Kconfig.kcsan')
-rw-r--r--lib/Kconfig.kcsan5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Kconfig.kcsan b/lib/Kconfig.kcsan
index 3d282d51849b..f271ff5fbb5a 100644
--- a/lib/Kconfig.kcsan
+++ b/lib/Kconfig.kcsan
@@ -40,6 +40,11 @@ menuconfig KCSAN
if KCSAN
+# Compiler capabilities that should not fail the test if they are unavailable.
+config CC_HAS_TSAN_COMPOUND_READ_BEFORE_WRITE
+ def_bool (CC_IS_CLANG && $(cc-option,-fsanitize=thread -mllvm -tsan-compound-read-before-write=1)) || \
+ (CC_IS_GCC && $(cc-option,-fsanitize=thread --param tsan-compound-read-before-write=1))
+
config KCSAN_VERBOSE
bool "Show verbose reports with more information about system state"
depends on PROVE_LOCKING