efi: avoid fortify checks in EFI stub
PATCH 58/96 efi: avoid fortify checks in EFI stub
From: Kees Cook <[email protected]>
Subject: efi: avoid fortify checks in EFI stub
This avoids CONFIG_FORTIFY_SOURCE from being enabled during the EFI stub build, as adding a panic() implementation may not work well. This can be adjusted in the future.
Signed-off-by Kees Cook <[email protected]>
Suggested-by Daniel Micay <[email protected]>
Reviewed-by Ard Biesheuvel <[email protected]>
Acked-by Mark Rutland <[email protected]>
Cc Matt Fleming <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/firmware/efi/libstub/Makefile | 1 + 1 file changed, 1 insertion(+)
drivers/firmware/efi/libstub/Makefile renamed from drivers/firmware/efi/libstub/Makefile~efi-avoid-fortify-checks-in-efi-stub +1 -0
@@ -17,6 +17,7 @@ cflags-$(CONFIG_ARM) := $(subst -pg,,$( cflags-$(CONFIG_EFI_ARMSTUB) += -I$(srctree)/scripts/dtc/libfdt KBUILD_CFLAGS := $(cflags-y) -DDISABLE_BRANCH_PROFILING \ + -D__NO_FORTIFY \ $(call cc-option,-ffreestanding) \ $(call cc-option,-fno-stack-protector)
_