[RFC PATCH v3 19/20] x86/purgatory: Disable CFI

Sami Tolvanen samitolvanen at google.com
Fri Jun 10 16:35:12 PDT 2022


Disable CONFIG_CFI_CLANG for the stand-alone purgatory.ro.

Signed-off-by: Sami Tolvanen <samitolvanen at google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers at google.com>
Reviewed-by: Kees Cook <keescook at chromium.org>
Tested-by: Nick Desaulniers <ndesaulniers at google.com>
Tested-by: Sedat Dilek <sedat.dilek at gmail.com>
---
 arch/x86/purgatory/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
index ae53d54d7959..b3fa947fa38b 100644
--- a/arch/x86/purgatory/Makefile
+++ b/arch/x86/purgatory/Makefile
@@ -55,6 +55,10 @@ ifdef CONFIG_RETPOLINE
 PURGATORY_CFLAGS_REMOVE		+= $(RETPOLINE_CFLAGS)
 endif
 
+ifdef CONFIG_CFI_CLANG
+PURGATORY_CFLAGS_REMOVE		+= $(CC_FLAGS_CFI)
+endif
+
 CFLAGS_REMOVE_purgatory.o	+= $(PURGATORY_CFLAGS_REMOVE)
 CFLAGS_purgatory.o		+= $(PURGATORY_CFLAGS)
 
-- 
2.36.1.476.g0c4daa206d-goog




More information about the linux-arm-kernel mailing list