]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
efi/libstub: Disable Shadow Call Stack
authorSami Tolvanen <samitolvanen@google.com>
Mon, 27 Apr 2020 16:00:18 +0000 (09:00 -0700)
committerWill Deacon <will@kernel.org>
Fri, 15 May 2020 15:35:50 +0000 (16:35 +0100)
Shadow stacks are not available in the EFI stub, filter out SCS flags.

Suggested-by: James Morse <james.morse@arm.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/firmware/efi/libstub/Makefile

index 094eabdecfe61fa5a8707d5ec787019b5b42fd3b..b52ae8c29560d92f677759d842090c31b879752b 100644 (file)
@@ -32,6 +32,9 @@ KBUILD_CFLAGS                 := $(cflags-y) -DDISABLE_BRANCH_PROFILING \
                                   $(call cc-option,-fno-stack-protector) \
                                   -D__DISABLE_EXPORTS
 
+# remove SCS flags from all objects in this directory
+KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS))
+
 GCOV_PROFILE                   := n
 KASAN_SANITIZE                 := n
 UBSAN_SANITIZE                 := n