summaryrefslogtreecommitdiff
path: root/kernel/kcsan/Makefile
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2021-11-30 12:44:21 +0100
committerPaul E. McKenney <paulmck@kernel.org>2021-12-09 16:42:27 -0800
commit71b0e3aeb28256712945d99ca67b3f5e3ed7e0b1 (patch)
treeabe1638ba6b1dbec580293fc06c33f943b4931de /kernel/kcsan/Makefile
parent116af35e38cf97ed72111ac6bea19f8acea2d0ba (diff)
kcsan: selftest: Add test case to check memory barrier instrumentation
Memory barrier instrumentation is crucial to avoid false positives. To avoid surprises, run a simple test case in the boot-time selftest to ensure memory barriers are still instrumented correctly. Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/kcsan/Makefile')
-rw-r--r--kernel/kcsan/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/kcsan/Makefile b/kernel/kcsan/Makefile
index c2bb07f5bcc7..ff47e896de3b 100644
--- a/kernel/kcsan/Makefile
+++ b/kernel/kcsan/Makefile
@@ -11,6 +11,8 @@ CFLAGS_core.o := $(call cc-option,-fno-conserve-stack) \
-fno-stack-protector -DDISABLE_BRANCH_PROFILING
obj-y := core.o debugfs.o report.o
+
+KCSAN_INSTRUMENT_BARRIERS_selftest.o := y
obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o
CFLAGS_kcsan_test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer