Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: f78b937c95ddc4f7a29e41fee98e96076828a108
      
https://github.com/tianocore/edk2/commit/f78b937c95ddc4f7a29e41fee98e96076828a108
  Author: Gerd Hoffmann <kra...@redhat.com>
  Date:   2022-02-07 (Mon, 07 Feb 2022)

  Changed paths:
    M MdeModulePkg/Core/RuntimeDxe/Runtime.c

  Log Message:
  -----------
  MdeModulePkg/RuntimeDxe: clear mVirtualMapMaxIndex

When setting mVirtualMap to NULL also set mVirtualMapMaxIndex to 0.
Without that RuntimeDriverConvertPointer() will go search the ZeroPage
for EFI_MEMORY_DESCRIPTOR entries.

In case mVirtualMapMaxIndex happens to be small small enough that'll go
unnoticed, the search will not find anything and EFI_NOT_FOUND will be
returned.

In case mVirtualMapMaxIndex is big enough the search will reach the end
of the ZeroPage and trigger a page fault.

Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
Reviewed-by: Liming Gao <gaolim...@byosoft.com.cn>




_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to