Re: [PATCH v2 1/1] ArmPkg: Fix uninitialised variable in ArmMmuStandaloneMmLib
Yes. This patch with fix the build failure reported by the CI.
From: Ard Biesheuvel <ardb@...>
Sent: Friday, 26 February 2021, 6:46 pm
To: Sughosh Ganu; Liming Gao (Byosoft address)
Cc: email@example.com; Sami Mujawar; Ard Biesheuvel; Leif Lindholm; Matteo Carlini; Ben Adderson; nd
Subject: 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@...> wrote:
> On Thu, 25 Feb 2021 at 22:41, Sami Mujawar <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
>> - the target sends FFA_MSG_SEND_DIRECT_RESP with a success or
>> failure code.
>> - FFA_MSG_SEND_DIRECT_REQ transmission failure.
>> - 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@...>
>> The changes can be seen at:
> Tested the changes on the StandaloneMm image on the Qemu platform.
> Tested-by: Sughosh Ganu <sughosh.ganu@...>
> Reviewed-by: Sughosh Ganu <sughosh.ganu@...>
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)