OSDN Git Service

riscv/purgatory: Disable CFI
authorSami Tolvanen <samitolvanen@google.com>
Mon, 10 Jul 2023 18:35:50 +0000 (18:35 +0000)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 23 Aug 2023 21:16:40 +0000 (14:16 -0700)
Filter out CC_FLAGS_CFI when CONFIG_CFI_CLANG.

Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Link: https://lore.kernel.org/r/20230710183544.999540-13-samitolvanen@google.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/purgatory/Makefile

index dc20e16..9e64767 100644 (file)
@@ -77,6 +77,10 @@ ifdef CONFIG_STACKPROTECTOR_STRONG
 PURGATORY_CFLAGS_REMOVE                += -fstack-protector-strong
 endif
 
+ifdef CONFIG_CFI_CLANG
+PURGATORY_CFLAGS_REMOVE                += $(CC_FLAGS_CFI)
+endif
+
 CFLAGS_REMOVE_purgatory.o      += $(PURGATORY_CFLAGS_REMOVE)
 CFLAGS_purgatory.o             += $(PURGATORY_CFLAGS)