Re: [edk2-devel] [PATCH v4 3/4] StandaloneMmPkg/Core: Fix issue that offset calculation might be wrong

2023-11-08 Thread Laszlo Ersek
On 11/6/23 08:52, Xu, Wei6 wrote: > 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.

[edk2-devel] [PATCH v4 3/4] StandaloneMmPkg/Core: Fix issue that offset calculation might be wrong

2023-11-05 Thread Xu, Wei6
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