[edk2] [PATCH 0/5] Implement heap guard feature

Jian J Wang posted 5 patches 7 years, 2 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
MdeModulePkg/Core/Dxe/DxeMain.inf            |    4 +
MdeModulePkg/Core/Dxe/Mem/HeapGuard.c        | 1171 +++++++++++++++++++++
MdeModulePkg/Core/Dxe/Mem/HeapGuard.h        |  391 +++++++
MdeModulePkg/Core/Dxe/Mem/Imem.h             |   38 +-
MdeModulePkg/Core/Dxe/Mem/Page.c             |  129 ++-
MdeModulePkg/Core/Dxe/Mem/Pool.c             |  154 ++-
MdeModulePkg/Core/PiSmmCore/Misc/HeapGuard.c | 1438 ++++++++++++++++++++++++++
MdeModulePkg/Core/PiSmmCore/Misc/HeapGuard.h |  395 +++++++
MdeModulePkg/Core/PiSmmCore/Misc/PageTable.c |  704 +++++++++++++
MdeModulePkg/Core/PiSmmCore/Misc/PageTable.h |  174 ++++
MdeModulePkg/Core/PiSmmCore/Page.c           |   51 +-
MdeModulePkg/Core/PiSmmCore/PiSmmCore.c      |   12 +-
MdeModulePkg/Core/PiSmmCore/PiSmmCore.h      |   80 +-
MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf    |    8 +
MdeModulePkg/Core/PiSmmCore/Pool.c           |   77 +-
MdeModulePkg/MdeModulePkg.dec                |   57 +
MdeModulePkg/MdeModulePkg.uni                |   58 ++
UefiCpuPkg/CpuDxe/CpuPageTable.c             |    5 +-
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf |    1 +
UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c      |    2 +-
20 files changed, 4854 insertions(+), 95 deletions(-)
create mode 100644 MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
create mode 100644 MdeModulePkg/Core/Dxe/Mem/HeapGuard.h
create mode 100644 MdeModulePkg/Core/PiSmmCore/Misc/HeapGuard.c
create mode 100644 MdeModulePkg/Core/PiSmmCore/Misc/HeapGuard.h
create mode 100644 MdeModulePkg/Core/PiSmmCore/Misc/PageTable.c
create mode 100644 MdeModulePkg/Core/PiSmmCore/Misc/PageTable.h
[edk2] [PATCH 0/5] Implement heap guard feature
Posted by Jian J Wang 7 years, 2 months ago
This feature makes use of paging mechanism to add a hidden (not present)
page just before and after the allocated memory block. If the code tries
to access memory outside of the allocated part, page fault exception will
be triggered.

This feature is disabled by default and is not recommended to enable it
in production build of BIOS.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Ayellet Wolman <ayellet.wolman@intel.com>
Suggested-by: Ayellet Wolman <ayellet.wolman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>

Jian J Wang (5):
  MdeModulePkg/DxeCore: Implement heap guard feature for UEFI
  MdeModulePkg/PiSmmCore: Implement heap guard feature for SMM mode
  MdeModulePkg/MdeModulePkg.dec,.uni: Add heap guard related PCDs and
    string tokens
  UefiCpuPkg/CpuDxe: Reduce debug message
  UefiCpuPkg/PiSmmCpuDxeSmm: Disable page table protection

 MdeModulePkg/Core/Dxe/DxeMain.inf            |    4 +
 MdeModulePkg/Core/Dxe/Mem/HeapGuard.c        | 1171 +++++++++++++++++++++
 MdeModulePkg/Core/Dxe/Mem/HeapGuard.h        |  391 +++++++
 MdeModulePkg/Core/Dxe/Mem/Imem.h             |   38 +-
 MdeModulePkg/Core/Dxe/Mem/Page.c             |  129 ++-
 MdeModulePkg/Core/Dxe/Mem/Pool.c             |  154 ++-
 MdeModulePkg/Core/PiSmmCore/Misc/HeapGuard.c | 1438 ++++++++++++++++++++++++++
 MdeModulePkg/Core/PiSmmCore/Misc/HeapGuard.h |  395 +++++++
 MdeModulePkg/Core/PiSmmCore/Misc/PageTable.c |  704 +++++++++++++
 MdeModulePkg/Core/PiSmmCore/Misc/PageTable.h |  174 ++++
 MdeModulePkg/Core/PiSmmCore/Page.c           |   51 +-
 MdeModulePkg/Core/PiSmmCore/PiSmmCore.c      |   12 +-
 MdeModulePkg/Core/PiSmmCore/PiSmmCore.h      |   80 +-
 MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf    |    8 +
 MdeModulePkg/Core/PiSmmCore/Pool.c           |   77 +-
 MdeModulePkg/MdeModulePkg.dec                |   57 +
 MdeModulePkg/MdeModulePkg.uni                |   58 ++
 UefiCpuPkg/CpuDxe/CpuPageTable.c             |    5 +-
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf |    1 +
 UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c      |    2 +-
 20 files changed, 4854 insertions(+), 95 deletions(-)
 create mode 100644 MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
 create mode 100644 MdeModulePkg/Core/Dxe/Mem/HeapGuard.h
 create mode 100644 MdeModulePkg/Core/PiSmmCore/Misc/HeapGuard.c
 create mode 100644 MdeModulePkg/Core/PiSmmCore/Misc/HeapGuard.h
 create mode 100644 MdeModulePkg/Core/PiSmmCore/Misc/PageTable.c
 create mode 100644 MdeModulePkg/Core/PiSmmCore/Misc/PageTable.h

-- 
2.14.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel