From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web08.5345.1621385974632692623 for ; Tue, 18 May 2021 17:59:35 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 19 May 2021 08:59:14 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Wang, Jian J'" , "'Ard Biesheuvel'" , "'edk2-devel-groups-io'" Cc: , "'Yao, Jiewen'" , "'Lu, XiaoyuX'" , "'Jiang, Guomin'" References: <20210514121714.17312-1-sergei@posteo.net> <20210514121714.17312-4-sergei@posteo.net> <20210515130041.GA6005@zx-spectrum> <009401d74b81$001f88d0$005e9a70$@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYxIDMvM10gQ3J5cHRvUGtnL0Jhc2VDcnlwdExpYjogRml4IHBvc3NpYmxlIHVuaW5pdGlhbGl6ZWQgdXNl?= Date: Wed, 19 May 2021 08:59:08 +0800 Message-ID: <011001d74c4a$314475a0$93cd60e0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHv1Mih3XPKyeoWUMbs7k6n1iRLGgIXk0K3AbzNC78CFoI6qQHYLqxZAfJDQh4CBLrY3qpbGdHw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Jian: These three patches are separate. They don't impact others. So, I think = we can merge single one.=20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: Wang, Jian J > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B45=E6=9C=8818=E6=97=A5= 15:36 > =E6=94=B6=E4=BB=B6=E4=BA=BA: Ard Biesheuvel ; edk2-deve= l-groups-io > ; Liming Gao (Byosoft address) > > =E6=8A=84=E9=80=81: sergei@posteo.net; Yao, Jiewen ; Lu, XiaoyuX > ; Jiang, Guomin > =E4=B8=BB=E9=A2=98: RE: [edk2-devel] [PATCH v1 3/3] CryptoPkg/BaseCryptL= ib: Fix possible > uninitialized use >=20 > Ard, >=20 > Patch 1&2 haven't got r-b. I'm not sure we can merge patch 3 separately. >=20 > Regards, > Jian >=20 > > -----Original Message----- > > From: Ard Biesheuvel > > Sent: Tuesday, May 18, 2021 3:27 PM > > To: edk2-devel-groups-io ; Liming Gao (Byosoft > address) > > > > Cc: sergei@posteo.net; Yao, Jiewen ; Wang, Jian = J > > ; Lu, XiaoyuX ; Jiang, > Guomin > > > > Subject: Re: [edk2-devel] [PATCH v1 3/3] CryptoPkg/BaseCryptLib: Fix > possible > > uninitialized use > > > > Please merge this fix asap. Our CI is broken because of it, and we are > > in the soft freeze so we need the CI up and running to catch potential > > issues before the release. > > > > Thanks, > > Ard. > > > > On Tue, 18 May 2021 at 02:59, gaoliming > wrote: > > > > > > Sergei: > > > Yes. GCC49 is LTO disable GCC tool chain. GCC5 is LTO enable tool > chain. > > > They both work on the different GCC version, such as gcc5, gcc6.. > > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90844 mentions > > > -ffat-lto-objects option that can trig the warning with LTO option. = Do you > > > try it? > > > > > > If this option works, we can update GCC5 tool chain definition in > > > tools_def.txt, then this issue can be detected in CI GCC5 build. > > > > > > Thanks > > > Liming > > > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > > > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io =E4=BB=A3=E8=A1=A8 Sergei > > > > Dmitrouk > > > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B45=E6=9C=8815=E6= = =97=A5 21:01 > > > > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; jiewen.yao@inte= l.com > > > > =E6=8A=84=E9=80=81: Wang, Jian J ; Lu, Xiao= yuX > > > > ; Jiang, Guomin > > > > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH v1 3/3] CryptoPkg/Base= CryptLib: Fix > possible > > > > uninitialized use > > > > > > > > Hello Jiewen, > > > > > > > > I get the error only for GCC49 and not for GCC5 toolchain. CI use= s > GCC5. > > > > > > > > So I compared build commands and this seems to depend on LTO. > Adding > > > > `-flto` > > > > impedes compiler's ability to detect such simple issues. > > > > > > > > I've found relevant bug report, there is even fix suggestion from = last > > > month: > > > > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90844 > > > > > > > > Regards, > > > > Sergei > > > > > > > > On Sat, May 15, 2021 at 12:30:44AM +0000, Yao, Jiewen wrote: > > > > > Hi Sergei > > > > > Thank you very much for the fix. > > > > > Reviewed-by: Jiewen Yao > > > > > > > > > > I am a little surprised why it is not caught before. It is an ob= vious > > > logic issue. > > > > > > > > > > Do you think we can do anything on CI, to catch it during pre-ch= eck-in > > > in the > > > > future? > > > > > I just feel it is burden to make it post-check-in fix. > > > > > > > > > > > > > > > Thank you > > > > > Yao Jiewen > > > > > > > > > > > -----Original Message----- > > > > > > From: Sergei Dmitrouk > > > > > > Sent: Friday, May 14, 2021 8:17 PM > > > > > > To: devel@edk2.groups.io > > > > > > Cc: Yao, Jiewen ; Wang, Jian J > > > > ; > > > > > > Lu, XiaoyuX ; Jiang, Guomin > > > > > > > > > > Subject: [PATCH v1 3/3] CryptoPkg/BaseCryptLib: Fix possible > > > uninitialized > > > > use > > > > > > > > > > > > `Result` can be used uninitialized in both functions after fol= lowing > > > > > > either first or second `goto` statement. > > > > > > > > > > > > Cc: Jiewen Yao > > > > > > Cc: Jian J Wang > > > > > > Cc: Xiaoyu Lu > > > > > > Cc: Guomin Jiang > > > > > > Signed-off-by: Sergei Dmitrouk > > > > > > --- > > > > > > CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPss.c | 1 + > > > > > > CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSign.c | 1 + > > > > > > 2 files changed, 2 insertions(+) > > > > > > > > > > > > diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPss.c > > > > > > b/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPss.c > > > > > > index 4009d37d5f91..0b2960f06c4c 100644 > > > > > > --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPss.c > > > > > > +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPss.c > > > > > > @@ -82,6 +82,7 @@ RsaPssVerify ( > > > > > > EVP_PKEY_CTX *KeyCtx; > > > > > > CONST EVP_MD *HashAlg; > > > > > > > > > > > > + Result =3D FALSE; > > > > > > EvpRsaKey =3D NULL; > > > > > > EvpVerifyCtx =3D NULL; > > > > > > KeyCtx =3D NULL; > > > > > > diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSign= .c > > > > > > b/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSign.c > > > > > > index b66b6f7296ad..ece765f9ae0a 100644 > > > > > > --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSign.c > > > > > > +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptRsaPssSign.c > > > > > > @@ -97,6 +97,7 @@ RsaPssSign ( > > > > > > EVP_PKEY_CTX *KeyCtx; > > > > > > CONST EVP_MD *HashAlg; > > > > > > > > > > > > + Result =3D FALSE; > > > > > > EvpRsaKey =3D NULL; > > > > > > EvpVerifyCtx =3D NULL; > > > > > > KeyCtx =3D NULL; > > > > > > -- > > > > > > 2.17.6 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >=20 > > > > > >