summaryrefslogtreecommitdiff
path: root/StandaloneMmPkg/StandaloneMmPkg.dec
diff options
context:
space:
mode:
authorWei6 Xu <wei6.xu@intel.com>2023-10-30 14:17:24 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-12-19 09:29:07 +0000
commit4a9fcab124369c5568a8373a0d2fbc527867a4d9 (patch)
treed75eef6045cb54a0ae271dcea43f7366f70828f7 /StandaloneMmPkg/StandaloneMmPkg.dec
parent0904161f6f051b9f42ffa65b1f9aa4a5b29e2119 (diff)
downloadedk2-4a9fcab124369c5568a8373a0d2fbc527867a4d9.zip
edk2-4a9fcab124369c5568a8373a0d2fbc527867a4d9.tar.gz
edk2-4a9fcab124369c5568a8373a0d2fbc527867a4d9.tar.bz2
StandaloneMmPkg/Core: Fix issue that offset calculation might be wrong
MmCoreFfsFindMmDriver() assumes FileHeader is EFI_FFS_FILE_HEADER. If FileHeader is an EFI_FFS_FILE_HEADER2, 'FileHeader + 1' will get a wrong section address. Use FfsFindSection to get the section directly, instead of 'FileHeader + 1' to avoid this issue. MmCoreFfsFindMmDriver() also assumes section is EFI_COMMON_SECTION_HEADER. If Section is EFI_COMMON_SECTION_HEADER2, 'Section + 1' will get a wrong wrong InnerFvHeader adress. Add section head detection and calculate the address accordingly. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'StandaloneMmPkg/StandaloneMmPkg.dec')
0 files changed, 0 insertions, 0 deletions