summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.kmsan
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.kmsan')
-rw-r--r--scripts/Makefile.kmsan8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/Makefile.kmsan b/scripts/Makefile.kmsan
new file mode 100644
index 0000000000..b5b0aa6132
--- /dev/null
+++ b/scripts/Makefile.kmsan
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
+kmsan-cflags := -fsanitize=kernel-memory
+
+ifdef CONFIG_KMSAN_CHECK_PARAM_RETVAL
+kmsan-cflags += -fsanitize-memory-param-retval
+endif
+
+export CFLAGS_KMSAN := $(kmsan-cflags)