Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 38ba4a64c513d84fa65a0c4f8403aefe90818720
https://github.com/tianocore/edk2/commit/38ba4a64c513d84fa65a0c4f8403aefe90818720
Author: Michael Kubacki <[email protected]>
Date: 2023-11-28 (Tue, 28 Nov 2023)
Changed paths:
M ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
Log Message:
-----------
ArmPkg/Drivers/CpuDxe: Use lower and upper attributes
GetNextEntryAttribute() is currently applying a 64-bit mask
(TT_ATTRIBUTES_MASK) to a 32-bit descriptor value (EntryType).
The original descriptor was 64 bits containing the upper and
lower attributes which are included in TT_ATTRIBUTES_MASK.
The PrevEntryAttribute parameter is also a UINT32, but passed to
PageAttributeToGcdAttribute() for a UINT64 parameter where the
function checks masks in the upper 32 bits of the integer value:
PageAttributeToGcdAttribute (*PrevEntryAttribute)
...
STATIC
UINT64
PageAttributeToGcdAttribute (
IN UINT64 PageAttributes
)
...
if ((PageAttributes & (TT_PXN_MASK | TT_UXN_MASK)) != 0) {
GcdAttributes |= EFI_MEMORY_XP;
}
...
#define TT_PXN_MASK BIT53
#define TT_UXN_MASK BIT54 // EL1&0
This change removes UINT32 intermediary values. For EntryType,
eliminating an unncessary cast. For EntryAttribute, preserving the
upper and lower attributes for evaluation in
PageAttributeToGcdAttribute().
This also resolves the following compiler warning previously present
on Visual Studio for the assignment to the previously 32-bit local
variables.
'=': conversion from 'UINT64' to 'UINT32', possible loss of data
Signed-off-by: Michael Kubacki <[email protected]>
Reviewed-by: Ard Biesheuvel <[email protected]>
Commit: 466f2f0c5fc0f30e8e7157172ab7fb74e85640c6
https://github.com/tianocore/edk2/commit/466f2f0c5fc0f30e8e7157172ab7fb74e85640c6
Author: Nhi Pham <[email protected]>
Date: 2023-11-28 (Tue, 28 Nov 2023)
Changed paths:
M MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
M MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleRuntime.c
Log Message:
-----------
MdeModulePkg/DxeCapsuleLibFmp: Fix crash with VirtualAddressMap omitted
If the SetVirtualAddressMap() is not called, mIsVirtualAddrConverted
is FALSE and the kernel crash occurs in IsNestedFmpCapsule() when
executing gBS->LocateProtocol () in the else case.
To serve the omitted SetVirtualAddressMap() call, we could just check
mEsrtTable presence instead of relying on mIsVirtualAddrConverted.
Signed-off-by: Nhi Pham <[email protected]>
Reviewed-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/e1627f77201a...466f2f0c5fc0
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits