[edk2-devel] [PATCH v2 1/1] ArmPkg: Fix uninitialised variable in ArmMmuStandaloneMmLib

Ard Biesheuvel ardb at kernel.org
Sat Feb 27 11:11:01 UTC 2021


On Sat, 27 Feb 2021 at 10:40, gaoliming <gaoliming at byosoft.com.cn> wrote:
>
> Ard:
>   This patch fixes the compiler build error. It is a bug fix. I am OK to merge it for this stable tag.
>

OK, thanks,

Merged as #1467

> > -----邮件原件-----
> > 发件人: Ard Biesheuvel <ardb at kernel.org>
> > 发送时间: 2021年2月27日 2:46
> > 收件人: Sughosh Ganu <sughosh.ganu at linaro.org>; Liming Gao (Byosoft
> > address) <gaoliming at byosoft.com.cn>
> > 抄送: devel at edk2.groups.io; Sami Mujawar <sami.mujawar at arm.com>; Ard
> > Biesheuvel <ardb+tianocore at kernel.org>; Leif Lindholm <leif at nuviainc.com>;
> > Matteo.Carlini at arm.com; Ben.Adderson at arm.com; nd <nd at arm.com>
> > 主题: Re: [edk2-devel] [PATCH v2 1/1] ArmPkg: Fix uninitialised variable in
> > ArmMmuStandaloneMmLib
> >
> > On Fri, 26 Feb 2021 at 11:58, Sughosh Ganu <sughosh.ganu at linaro.org>
> > wrote:
> > >
> > >
> > > On Thu, 25 Feb 2021 at 22:41, Sami Mujawar <sami.mujawar at arm.com>
> > 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 <sami.mujawar at arm.com>
> > >> ---
> > >> 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 <sughosh.ganu at linaro.org>
> > > Reviewed-by: Sughosh Ganu <sughosh.ganu at linaro.org>
> > >
> >
> > 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)
>
>
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72248): https://edk2.groups.io/g/devel/message/72248
Mute This Topic: https://groups.io/mt/80948646/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list