summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/FirmwareStorageFormat/Common.py
diff options
context:
space:
mode:
authorMichael Roth <michael.roth@amd.com>2023-11-15 11:51:53 -0600
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-12-08 13:25:11 +0000
commite8c23d1e27f70dcb2e59010ded6df32374eaa84a (patch)
treef92ec73f0c6c4b9473d732ee1b3ce4ee482962f6 /BaseTools/Source/Python/FirmwareStorageFormat/Common.py
parent7eb504060787c9c37d5b3c33f5d65021d553ea3f (diff)
downloadedk2-e8c23d1e27f70dcb2e59010ded6df32374eaa84a.tar.gz
edk2-e8c23d1e27f70dcb2e59010ded6df32374eaa84a.tar.bz2
edk2-e8c23d1e27f70dcb2e59010ded6df32374eaa84a.zip
OvmfPkg/MemEncryptSevLib: Fix address overflow during PVALIDATE
The struct used for GHCB-based page-state change requests uses a 40-bit bit-field for the GFN, which is shifted by PAGE_SHIFT to generate a 64-bit address. However, anything beyond 40-bits simply gets shifted off when doing this, which will cause issues when dealing with 1TB+ addresses. Fix this by casting the 40-bit GFN values to 64-bit ones prior to shifting it by PAGE_SHIFT. Fixes: ade62c18f474 ("OvmfPkg/MemEncryptSevLib: add support to validate system RAM") Signed-off-by: Michael Roth <michael.roth@amd.com> Message-Id: <20231115175153.813213-1-michael.roth@amd.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'BaseTools/Source/Python/FirmwareStorageFormat/Common.py')
0 files changed, 0 insertions, 0 deletions