summaryrefslogtreecommitdiff
path: root/arch/x86/lib/Makefile
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-05-04 15:25:30 +0200
committerThomas Gleixner <tglx@linutronix.de>2020-05-04 15:25:30 +0200
commita8644aebec1152b992d5d54a05a538d338262944 (patch)
tree5c0084fbcaf77545497d0ca92bc033693b185653 /arch/x86/lib/Makefile
parent9e96e646e6f890308110cb7c81f200f5211cf082 (diff)
parent3b02a051d25d9600e9d403ad3043aed7de00160e (diff)
Merge branch 'locking/kcsan' into x86/entryentry-base
Pull the pending KCSAN changes as the required changes vs. atomics to fixup INT3 interfere with the KCSAN modifications of atomics.
Diffstat (limited to 'arch/x86/lib/Makefile')
-rw-r--r--arch/x86/lib/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 5246db42de45..6110bce7237b 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -6,10 +6,19 @@
# Produces uninteresting flaky coverage.
KCOV_INSTRUMENT_delay.o := n
+# KCSAN uses udelay for introducing watchpoint delay; avoid recursion.
+KCSAN_SANITIZE_delay.o := n
+ifdef CONFIG_KCSAN
+# In case KCSAN+lockdep+ftrace are enabled, disable ftrace for delay.o to avoid
+# lockdep -> [other libs] -> KCSAN -> udelay -> ftrace -> lockdep recursion.
+CFLAGS_REMOVE_delay.o = $(CC_FLAGS_FTRACE)
+endif
+
# Early boot use of cmdline; don't instrument it
ifdef CONFIG_AMD_MEM_ENCRYPT
KCOV_INSTRUMENT_cmdline.o := n
KASAN_SANITIZE_cmdline.o := n
+KCSAN_SANITIZE_cmdline.o := n
ifdef CONFIG_FUNCTION_TRACER
CFLAGS_REMOVE_cmdline.o = -pg