aboutsummaryrefslogtreecommitdiff
path: root/kernel/kcsan/Makefile
diff options
context:
space:
mode:
authorGravatar Marco Elver <elver@google.com> 2019-11-14 19:02:54 +0100
committerGravatar Paul E. McKenney <paulmck@kernel.org> 2019-11-16 07:23:13 -0800
commitdfd402a4c4baae42398ce9180ff424d589b8bffc (patch)
treee628a40284725614b915478123302ed0371523e4 /kernel/kcsan/Makefile
parentLinux 5.4-rc7 (diff)
downloadlinux-dfd402a4c4baae42398ce9180ff424d589b8bffc.tar.gz
linux-dfd402a4c4baae42398ce9180ff424d589b8bffc.tar.bz2
linux-dfd402a4c4baae42398ce9180ff424d589b8bffc.zip
kcsan: Add Kernel Concurrency Sanitizer infrastructure
Kernel Concurrency Sanitizer (KCSAN) is a dynamic data-race detector for kernel space. KCSAN is a sampling watchpoint-based data-race detector. See the included Documentation/dev-tools/kcsan.rst for more details. This patch adds basic infrastructure, but does not yet enable KCSAN for any architecture. Signed-off-by: Marco Elver <elver@google.com> Acked-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/kcsan/Makefile')
-rw-r--r--kernel/kcsan/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/kcsan/Makefile b/kernel/kcsan/Makefile
new file mode 100644
index 000000000000..dd15b62ec0b5
--- /dev/null
+++ b/kernel/kcsan/Makefile
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0
+KCSAN_SANITIZE := n
+KCOV_INSTRUMENT := n
+
+CFLAGS_REMOVE_core.o = $(CC_FLAGS_FTRACE)
+
+CFLAGS_core.o := $(call cc-option,-fno-conserve-stack,) \
+ $(call cc-option,-fno-stack-protector,)
+
+obj-y := core.o debugfs.o report.o
+obj-$(CONFIG_KCSAN_SELFTEST) += test.o