]> git.proxmox.com Git - mirror_edk2.git/commit - UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
UefiCpuPkg/PiSmmCpuDxeSmm: Add a new mIsShadowStack flag
authorDun Tan <dun.tan@intel.com>
Tue, 9 Aug 2022 07:22:07 +0000 (15:22 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 15 Aug 2022 05:15:43 +0000 (05:15 +0000)
commit83d5871184d1e09332565bfc939e5fc8354b5b79
tree5a7b708e6d31cac6aa328110cfec9ad5be5e0df0
parent74f44d920a287beef6e5949494dd24d1e2f23145
UefiCpuPkg/PiSmmCpuDxeSmm: Add a new mIsShadowStack flag

This patch is code refactoring and doesn't change any functionality.
Add a new mIsShadowStack flag to identify whether current memory is
shadow stack. Previous smm code logic regards a RO range as shadow
stack and set the dirty bit in corresponding page table entry if
mInternalCr3 is not 0, which may be confusing.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c