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.web09.2179.1614418819457170955 for ; Sat, 27 Feb 2021 01:40:22 -0800 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 ([101.86.139.83]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Sat, 27 Feb 2021 17:40:11 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 101.86.139.83 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Ard Biesheuvel'" , "'Sughosh Ganu'" Cc: , "'Sami Mujawar'" , "'Ard Biesheuvel'" , "'Leif Lindholm'" , , , "'nd'" References: <20210225171110.41324-1-sami.mujawar@arm.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYyIDEvMV0gQXJtUGtnOiBGaXggdW5pbml0aWFsaXNlZCB2YXJpYWJsZSBpbiBBcm1NbXVTdGFuZGFsb25lTW1MaWI=?= Date: Sat, 27 Feb 2021 17:40:11 +0800 Message-ID: <003901d70cec$8b673150$a23593f0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGC7GkeRWuTk8KEjcFXSAsLsMqzpAEF55kaAja5tIaq+hrL4A== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Ard: This patch fixes the compiler build error. It is a bug fix. I am OK to = merge it for this stable tag.=20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: Ard Biesheuvel > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: = 2021=E5=B9=B42=E6=9C=8827=E6=97=A5 2:46 > =E6=94=B6=E4=BB=B6=E4=BA=BA: Sughosh Ganu ; = Liming Gao (Byosoft > address) > =E6=8A=84=E9=80=81: devel@edk2.groups.io; Sami Mujawar = ; Ard > Biesheuvel ; Leif Lindholm = ; > Matteo.Carlini@arm.com; Ben.Adderson@arm.com; nd > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH v2 1/1] ArmPkg: Fix = uninitialised variable in > ArmMmuStandaloneMmLib >=20 > On Fri, 26 Feb 2021 at 11:58, Sughosh Ganu > wrote: > > > > > > On Thu, 25 Feb 2021 at 22:41, Sami Mujawar > wrote: > >> > >> The following patches added support for StandaloneMM using FF-A: > >> 9da5ee116a28 ArmPkg: Allow FF-A calls to set memory region's = attributes > >> 0e43e02b9bd8 ArmPkg: Allow FF-A calls to get memory region's = attributes > >> > >> However, in the error handling logic for the Get/Set Memory = attributes, > >> the CLANG compiler reports that a status variable could be used = without > >> initialisation. This issue is a false positive and is not seen with = GCC. > >> > >> The Get/Set Memory attributes operation is atomic and therefore an > >> FFA_INTERRUPT or FFA_SUCCESS response is not expected in response > >> to FFA_MSG_SEND_DIRECT_REQ. So the remaining cases that could occur > >> are: > >> - the target sends FFA_MSG_SEND_DIRECT_RESP with a success or > >> failure code. > >> or > >> - FFA_MSG_SEND_DIRECT_REQ transmission failure. > >> > >> Therefore, > >> - reorder the error handling conditions such that it prevents the > >> uninitialised variable issue being flagged by CLANG. > >> - move the repetitive code to a static helper function and add > >> documentation at the appropriate places. > >> - fix error handling in functions that invoke = GetMemoryPermissions(). > >> > >> Signed-off-by: Sami Mujawar > >> --- > >> The changes can be seen at: > >> > https://github.com/samimujawar/edk2/tree/1657_stmm_ffa_fix_unused_var > _v2 > > > > > > Tested the changes on the StandaloneMm image on the Qemu platform. > > > > Tested-by: Sughosh Ganu > > Reviewed-by: Sughosh Ganu > > >=20 > Thanks. Sami, can you confirm that this patch fixes the CI failure I > reported to you in private? If so, I intend to merge this during the > freeze (assuming Liming is ok with that)