From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web08.5096.1650440370208245758 for ; Wed, 20 Apr 2022 00:39:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EyyEfUNj; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: osteffen@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650440369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zVqGrTYMizkDVEmb16FquZDbPh3jQy0r+kjIpM5XdZ8=; b=EyyEfUNjFy4hyLj07pFu39HhmBLvsJ7ZAR5K+Y33wNgKc4uEKjQT7y/4CkyNn+kkrnl30V d0MfFCziL1T/PzAr1ELDmtxZNPA9MUbxtQdW5dCBLjB0K4fbGsgKoGxcWK7Y6s9c/IWN/m 08O2cfIOHMmokooSTpDRWKbz2XUBBFw= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-637-SxCxn7pfPdmvwHzX5q6S7g-1; Wed, 20 Apr 2022 03:39:28 -0400 X-MC-Unique: SxCxn7pfPdmvwHzX5q6S7g-1 Received: by mail-ej1-f69.google.com with SMTP id ga31-20020a1709070c1f00b006cec400422fso503246ejc.22 for ; Wed, 20 Apr 2022 00:39:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=zVqGrTYMizkDVEmb16FquZDbPh3jQy0r+kjIpM5XdZ8=; b=BL9pjrid7JCJgVpA8nuAXjHHaFXctr5Pwhz1YklXME/Cd6v6MfYUcncQ3L5A2tBxck QubPRZQxCIjOL7QnjxVWncaxzjQpxufpRC5Zr/BTawje5dbkgLA1nbX+6Tz16H36taBs xUvLMZbDTXBveDHvTpHk0fCBZg4WKwZOwaKDbOQb50FoHNTztuwoZXZ3rDL76SvdiwK0 PmCd3//OHKwGwkGA2Fd2d6P5p5ybMeljlsUs7cFzcodd7ZcDIH6Xc7Rq3besdSbk3YaR aubhN1Lex/UG95TnLfCK6BysQW2CH+imjpCVuKUfSCjc8lwQgG1dC4JMUw0W7+t7sHzy W7lg== X-Gm-Message-State: AOAM533GV49ogm9g4RKbaVFxAEqse+TVrt79ku+ZLDfLK7Ou5JuxspXI g2Ej8KscX3cIFYcVb+W9ryRJ7QQV3Qv0PIwkDF1H1fJ53uXDft6cPn3J8O258ZDe0u22B5TXyTE 1mmT7uPha9awZ4UoQt8jO9st974eOPgYngaFqJkBdtIGdzY7PnqMN/py3KBwM9TdQfg== X-Received: by 2002:a17:907:96a7:b0:6ef:f52a:421f with SMTP id hd39-20020a17090796a700b006eff52a421fmr3009960ejc.752.1650440366521; Wed, 20 Apr 2022 00:39:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMOS60sK8bWTkPhVgkzTDLvBgF9gNKXWXWO3czh8Rq13HHa9FR9my8JamYOrqJvmNH1G4f/w== X-Received: by 2002:a17:907:96a7:b0:6ef:f52a:421f with SMTP id hd39-20020a17090796a700b006eff52a421fmr3009939ejc.752.1650440366226; Wed, 20 Apr 2022 00:39:26 -0700 (PDT) Return-Path: Received: from localhost (dslb-188-105-210-187.188.105.pools.vodafone-ip.de. [188.105.210.187]) by smtp.gmail.com with ESMTPSA id s14-20020aa7cb0e000000b00410bf015567sm9458133edt.92.2022.04.20.00.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 00:39:25 -0700 (PDT) Date: Wed, 20 Apr 2022 09:39:24 +0200 From: "Oliver Steffen" To: devel@edk2.groups.io, gaoliming@byosoft.com.cn Cc: bob.c.feng@intel.com, yuwei.chen@intel.com Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW2VkazItZGV2ZWxdIFtQQVRDSCAxLzFdIEJhc2VUb29sczogZGlzYWJsZSBzdGFjayBwcm90ZWN0b3IgKGdjYywgQUFSQ0g2NCk=?= Message-ID: <20220420073924.ptjydsda23dpgvwb@osteffen-laptop> References: <20220419144657.339414-1-osteffen@redhat.com> <20220419144657.339414-2-osteffen@redhat.com> <015701d85446$500701b0$f0150510$@byosoft.com.cn> MIME-Version: 1.0 In-Reply-To: <015701d85446$500701b0$f0150510$@byosoft.com.cn> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=osteffen@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit On 20.04.2022 07:36, gaoliming wrote: >GCC Stack Protector options come from GCC4.9.3. But, there is GCC48 in >tools_def. I am not sure whether GCC48 is still used. A valid point. GCC 4.8 accepts -fno-stack-protector. For IA32 and X64 this option is set in GCC48_$ARCH_CC_FLAGS. Setting it for AARCH64 starting with GCC4.8 would be more consistent than setting it for all versions by default. Cheers, Oliver > >Thanks >Liming > >> -----邮件原件----- >> 发件人: devel@edk2.groups.io 代表 Oliver Steffen >> 发送时间: 2022年4月19日 22:47 >> 收件人: devel@edk2.groups.io >> 抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn; >> yuwei.chen@intel.com; Oliver Steffen >> 主题: [edk2-devel] [PATCH 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 >> --- >> 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..bd3edf0d219b 100755 >> --- a/BaseTools/Conf/tools_def.template >> +++ b/BaseTools/Conf/tools_def.template >> @@ -1872,7 +1872,7 @@ DEFINE GCC_IA32_CC_FLAGS = >> DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double - >> DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) >> -mno-red-zone -Wno-address -mno-stack-arg-probe >> DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) >> -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char >> -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address >> -mthumb -mfloat-abi=soft -fno-pic -fno-pie >> DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access >> -DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) >> -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char >> -ffunction-sections -fdata-sections -Wno-address >> -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie >> -ffixed-x18 >> +DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) >> -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char >> -ffunction-sections -fdata-sections -Wno-address >> -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie >> -ffixed-x18 -fno-stack-protector >> DEFINE GCC_AARCH64_CC_XIPFLAGS = -mstrict-align >> -mgeneral-regs-only >> DEFINE GCC_DLINK_FLAGS_COMMON = -nostdlib --pie >> DEFINE GCC_DLINK2_FLAGS_COMMON = >> -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds >> -- >> 2.35.1 >> >> >> >> >> > > > > > > > >