Message ID | 20200416112430.1256-1-broonie@kernel.org |
---|---|
State | New |
Headers | show |
Series | [5.6] arm64: Always force a branch protection mode when the compiler has one | expand |
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index dca1a97751ab..4e6ce2d9196e 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -65,6 +65,10 @@ stack_protector_prepare: prepare0 include/generated/asm-offsets.h)) endif +# Ensure that if the compiler supports branch protection we default it +# off. +KBUILD_CFLAGS += $(call cc-option,-mbranch-protection=none) + ifeq ($(CONFIG_CPU_BIG_ENDIAN), y) KBUILD_CPPFLAGS += -mbig-endian CHECKFLAGS += -D__AARCH64EB__