[PATCH 1/1] always override stack-protector variables in EFI build

24 views
Skip to first unread message

Quirin Gylstorff

unread,
Nov 13, 2023, 4:43:07 AM11/13/23
to efibootg...@googlegroups.com, jan.k...@siemens.com, felix.mo...@siemens.com
From: Felix Moessbauer <felix.mo...@siemens.com>

These flags require libc support which we do not have in the EFI part.
As distro builders inject the hardening flags into CFLAGS, which is fine
for the userspace part, but for EFI we need to override it.

Signed-off-by: Felix Moessbauer <felix.mo...@siemens.com>
---
Makefile.am | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 3b05e7c..831ed68 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -217,13 +217,18 @@ efi_cflags = \
-fshort-wchar \
-ffreestanding \
-fno-strict-aliasing \
- -fno-stack-protector \
-Wsign-compare \
-DGNU_EFI_USE_MS_ABI \
-Werror \
$(CFLAGS_MGENERAL_REGS_ONLY) \
$(CFLAGS)

+# the stack protectors needs libc support which we don't have in the EFI part
+# distro builders inject the hardening variables into CFLAGS, which is fine
+# for the userspace part, but for EFI we need to override it.
+efi_cflags += \
+ -fno-stack-protector
+
if ARCH_X86_64
efi_cflags += \
-mno-red-zone
--
2.39.2

Jan Kiszka

unread,
Nov 13, 2023, 10:59:00 AM11/13/23
to Quirin Gylstorff, efibootg...@googlegroups.com, felix.mo...@siemens.com
Can we do that a bit shorter as well? Eg.

# Override any stack protector enabling from CFLAGS -
# not supported in GNU EFI environment.

Jan

> if ARCH_X86_64
> efi_cflags += \
> -mno-red-zone

--
Siemens AG, Technology
Linux Expert Center

MOESSBAUER, Felix

unread,
Nov 14, 2023, 2:43:47 PM11/14/23
to Gylstorff, Quirin, Kiszka, Jan, efibootg...@googlegroups.com
On Mon, 2023-11-13 at 16:58 +0100, 'Jan Kiszka' via EFI Boot Guard
Feel free to fix that during merging. I would send a v2, but
temporarily don't have access to a SMTP server...

Felix

JEMS EBERHARD HORBEL

unread,
Dec 9, 2023, 1:53:33 PM12/9/23
to EFI Boot Guard
DIRECT SENDER IS HERE LETS DEAL.

JENS EBERHARD



MT103/202 DIRECT WIRE TRANSFER
PAYPAL TRANSFER
CASHAPP TRANSFER
ZELLE TRANSFER
TRANSFER WISE
WESTERN UNION TRANSFER
BITCOIN FLASHING 
BANK ACCOUNT LOADING/FLASHING
IBAN TO IBAN TRANSFER
MONEYGRAM TRANSFER
SLBC PROVIDER
CREDIT CARD TOP UP
SEPA TRANSFER
WIRE TRANSFER
GLOBALPAY INC US

Thanks.


NOTE; ONLY SERIOUS / RELIABLE RECEIVERS CAN CONTACT.

DM ME ON WHATSAPP FOR A SERIOUS DEAL.

+447405129573

Reply all
Reply to author
Forward
0 new messages