* [PATCH v2 0/1] BaseTools: disable stack protector (gcc, AARCH64) [not found] <16E78AC5D5F67B5F.27458@groups.io> @ 2022-04-20 8:16 ` Oliver Steffen 2022-04-20 8:16 ` [PATCH v2 1/1] " Oliver Steffen 0 siblings, 1 reply; 3+ messages in thread From: Oliver Steffen @ 2022-04-20 8:16 UTC (permalink / raw) To: devel; +Cc: bob.c.feng, gaoliming, yuwei.chen, Oliver Steffen PR: https://github.com/tianocore/edk2/pull/2795 Explicity disable the stack protection with -fno-stack-protection for builds using GCC on AARCH64. The gcc on Ubuntu enables -fstack-protector-strong by default starting with Ubuntu 21.10. GenFw fails if stack protection is enabled. v2: Set -fno-stack-portector for GCC starting with version 4.8 instead for all versions. Oliver Steffen (1): BaseTools: disable stack protector (gcc, AARCH64) BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.36.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/1] BaseTools: disable stack protector (gcc, AARCH64) 2022-04-20 8:16 ` [PATCH v2 0/1] BaseTools: disable stack protector (gcc, AARCH64) Oliver Steffen @ 2022-04-20 8:16 ` Oliver Steffen 2022-04-21 1:27 ` 回复: " gaoliming 0 siblings, 1 reply; 3+ messages in thread From: Oliver Steffen @ 2022-04-20 8:16 UTC (permalink / raw) To: devel; +Cc: bob.c.feng, gaoliming, yuwei.chen, Oliver Steffen Explicity disable the stack protection with -fno-stack-protection for builds using GCC on AARCH64. The gcc on Ubuntu enables -fstack-protector-strong by default starting with Ubuntu 21.10. GenFw fails if stack protection is enabled. Signed-off-by: Oliver Steffen <osteffen@redhat.com> --- BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 9c310cf23d25..1a49671a2708 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -1915,7 +1915,7 @@ DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GC DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector -mword-relocations DEFINE GCC48_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS) -DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS) +DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS) -fno-stack-protector DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS) DEFINE GCC48_ARM_DLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--oformat=elf32-littlearm DEFINE GCC48_ARM_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 -- 2.36.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* 回复: [PATCH v2 1/1] BaseTools: disable stack protector (gcc, AARCH64) 2022-04-20 8:16 ` [PATCH v2 1/1] " Oliver Steffen @ 2022-04-21 1:27 ` gaoliming 0 siblings, 0 replies; 3+ messages in thread From: gaoliming @ 2022-04-21 1:27 UTC (permalink / raw) To: 'Oliver Steffen', devel, ardb; +Cc: bob.c.feng, yuwei.chen Oliver: The change is good to me. I also include ARM maintainer Ard to review this change. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Thanks Liming > -----邮件原件----- > 发件人: Oliver Steffen <osteffen@redhat.com> > 发送时间: 2022年4月20日 16:16 > 收件人: devel@edk2.groups.io > 抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn; > yuwei.chen@intel.com; Oliver Steffen <osteffen@redhat.com> > 主题: [PATCH v2 1/1] BaseTools: disable stack protector (gcc, AARCH64) > > Explicity disable the stack protection with > -fno-stack-protection for builds using GCC on > AARCH64. > > The gcc on Ubuntu enables -fstack-protector-strong > by default starting with Ubuntu 21.10. > > GenFw fails if stack protection is enabled. > > Signed-off-by: Oliver Steffen <osteffen@redhat.com> > --- > BaseTools/Conf/tools_def.template | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/BaseTools/Conf/tools_def.template > b/BaseTools/Conf/tools_def.template > index 9c310cf23d25..1a49671a2708 100755 > --- a/BaseTools/Conf/tools_def.template > +++ b/BaseTools/Conf/tools_def.template > @@ -1915,7 +1915,7 @@ DEFINE GCC48_ARM_ASM_FLAGS = > $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GC > DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) > $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian > DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) > $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector > -mword-relocations > DEFINE GCC48_ARM_CC_XIPFLAGS = > DEF(GCC_ARM_CC_XIPFLAGS) > -DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) > $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS) > +DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) > $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS) > -fno-stack-protector > DEFINE GCC48_AARCH64_CC_XIPFLAGS = > DEF(GCC_AARCH64_CC_XIPFLAGS) > DEFINE GCC48_ARM_DLINK_FLAGS = > DEF(GCC_ARM_DLINK_FLAGS) -Wl,--oformat=elf32-littlearm > DEFINE GCC48_ARM_DLINK2_FLAGS = > DEF(GCC_DLINK2_FLAGS_COMMON) > -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 > -- > 2.36.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-21 1:27 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <16E78AC5D5F67B5F.27458@groups.io> 2022-04-20 8:16 ` [PATCH v2 0/1] BaseTools: disable stack protector (gcc, AARCH64) Oliver Steffen 2022-04-20 8:16 ` [PATCH v2 1/1] " Oliver Steffen 2022-04-21 1:27 ` 回复: " gaoliming
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox