Skip to contentSkip to conversation

efi: avoid fortify checks in EFI stub

PATCH New [email protected] 1 participant 1 message Jul 12, 2017 EFI

lore
Share & tools
lore
#0 lore raw

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.

---

 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
diff -puN drivers/firmware/efi/libstub/Makefile~efi-avoid-fortify-checks-in-efi-stub drivers/firmware/efi/libstub/Makefile
@@ -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)
 

_