audk/MdeModulePkg/Core
Ard Biesheuvel 7eb927db3e MdeModulePkg/DxeCore: implement memory protection policy
This implements a DXE memory protection policy that ensures that regions
that don't require executable permissions are mapped with the non-exec
attribute set.

First of all, it iterates over all entries in the UEFI memory map, and
removes executable permissions according to the configured DXE memory
protection policy, as recorded in PcdDxeNxMemoryProtectionPolicy.

Secondly, it sets or clears the non-executable attribute when allocating
or freeing pages, both for page based or pool based allocations.

Note that this complements the image protection facility, which applies
strict permissions to BootServicesCode/RuntimeServicesCode regions when
the section alignment allows it. The memory protection configured by this
patch operates on non-code regions only.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-02-28 15:01:10 +00:00
..
Dxe MdeModulePkg/DxeCore: implement memory protection policy 2017-02-28 15:01:10 +00:00
DxeIplPeim MdeModulePkg/DxeIplPeim: UINTN used wrongly for EFI_PHYSICAL_ADDRESS 2016-11-09 16:00:32 +08:00
Pei MdeModulePkg/PeiCore: allocate BootServicesCode memory for PE/COFF images 2017-02-28 14:59:50 +00:00
PiSmmCore MdeModulePkg/PiSmmCore: Add SmiHandlerProfile support. 2017-02-22 15:28:18 +08:00
RuntimeDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00