Semantic conflict around CONFIG_CFI_CLANG between Linus's tree and x86/core

Nathan Chancellor posted 1 patch 4 months ago
Semantic conflict around CONFIG_CFI_CLANG between Linus's tree and x86/core
Posted by Nathan Chancellor 4 months ago
Hi Ingo and other x86 folks,

Just a heads up, there will be a semantic conflict (for somewhat obvious
reasons) between

  23ef9d439769 ("kcfi: Rename CONFIG_CFI_CLANG to CONFIG_CFI")

that went into Linus's tree via the hardening tree and

  038c7dc66e27 ("compiler_types.h: Move __nocfi out of compiler-specific header")

which is currently in x86/core. I noticed this while kexec'ing under a
CFI kernel, which needs __nocfi as a result of

  2114796ca041 ("x86/kexec: Mark machine_kexec() with __nocfi")

otherwise there is a nice big splat and the machine dies :)

Cheers,
Nathan

diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 41c16fb8eb40..59288a2c1ad2 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -455,7 +455,7 @@ struct ftrace_likely_data {
 # define __noscs
 #endif
 
-#if defined(CONFIG_CFI_CLANG)
+#if defined(CONFIG_CFI)
 # define __nocfi		__attribute__((__no_sanitize__("kcfi")))
 #else
 # define __nocfi