Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 9280f16345755708ebd9553b3caee077ade0e592
      
https://github.com/tianocore/edk2/commit/9280f16345755708ebd9553b3caee077ade0e592
  Author: Oliver Smith-Denny <o...@microsoft.com>
  Date:   2025-07-08 (Tue, 08 Jul 2025)

  Changed paths:
    M UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c
    M UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFuncFit.c
    M UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c
    M UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFuncFit.c
    M UefiPayloadPkg/UefiPayloadEntry/X64/VirtualMemory.c

  Log Message:
  -----------
  UefiPayloadPkg: Don't Allocate Page 0

UefiPayloadPkg has copied the MdeModulePkg DxeIpl behavior to
create a memory allocation HOB for page 0. That is being changed
(see that commit for details), so also remove it here.

Signed-off-by: Oliver Smith-Denny <o...@microsoft.com>


  Commit: 83b30736bfb57b3895a089968319fb5c0cd42a28
      
https://github.com/tianocore/edk2/commit/83b30736bfb57b3895a089968319fb5c0cd42a28
  Author: Oliver Smith-Denny <o...@microsoft.com>
  Date:   2025-07-08 (Tue, 08 Jul 2025)

  Changed paths:
    M OvmfPkg/Library/PeilessStartupLib/DxeLoad.c
    M OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c

  Log Message:
  -----------
  OvmfPkg: Don't Allocate Page 0

OvmfPkg has copied the MdeModulePkg DxeIpl behavior to
create a memory allocation HOB for page 0. That is being changed
(see that commit for details), so also remove it here.

Signed-off-by: Oliver Smith-Denny <o...@microsoft.com>


  Commit: 91bb5cee36fe52ef012ddbead4f5932b3f9fd862
      
https://github.com/tianocore/edk2/commit/91bb5cee36fe52ef012ddbead4f5932b3f9fd862
  Author: Oliver Smith-Denny <o...@microsoft.com>
  Date:   2025-07-08 (Tue, 08 Jul 2025)

  Changed paths:
    M MdeModulePkg/Core/Dxe/Mem/Page.c
    M MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
    M MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
    M MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
    M MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h
    M MdeModulePkg/Core/Pei/Memory/MemoryServices.c

  Log Message:
  -----------
  MdeModulePkg: Don't Allocate Page 0

Currently DxeIpl attempts to set page 0 to all 0's and to
create a memory allocation HOB for it. However, DxeIpl will
also unmap the page when mapping page tables and if null
detection is not enabled, DxeCore will set the page to 0,
regardless of allocation status.

Because no consumers are using the memory allocation HOB for
page 0, drop it. Instead, ensure that PeiCore and DxeCore do
not allow allocating page 0; it should always be reserved for
null pointer detection. It also complicates the story for
platforms that are attempting to audit the system and ensure that
no modules are using page 0. With these memory allocation HOBs
in place, it is difficult to tell if it is simply DxeIpl who
has allocated the memory or another module.

This commit drops the memory allocation HOB publishing and ensures
that DxeCore and PeiCore do not allocate page 0. DxeCore already
will not allocate page 0 to callers of AllocatePages who call with
a type other than AllocateAddress, this just changes so that
AllocateAddress cannot allocate at page 0 (which if null detection
is enabled will cause a page fault). PeiCore does not have
AllocateAddress and so this ensures standard allocations do not
receive page 0.

Signed-off-by: Oliver Smith-Denny <o...@microsoft.com>


Compare: https://github.com/tianocore/edk2/compare/0277d5d8f100...91bb5cee36fe

To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


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

Reply via email to