summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Dxe/DxeMain.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-02-02 19:03:34 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-07 13:18:38 +0000
commit6405cd03048c1850d5047bf66fefa04189a05c94 (patch)
treecb562feafc3f96ddf0c0a939e3aa4df3acd5c2a2 /MdeModulePkg/Core/Dxe/DxeMain.h
parentd6457b3090fea2e26f94e8419f77455945bc4c41 (diff)
downloadedk2-6405cd03048c1850d5047bf66fefa04189a05c94.zip
edk2-6405cd03048c1850d5047bf66fefa04189a05c94.tar.gz
edk2-6405cd03048c1850d5047bf66fefa04189a05c94.tar.bz2
MdeModulePkg: Enable forward edge CFI in mem attributes table
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4405 The memory attributes table has been extended with a flag that indicates whether or not the OS is permitted to map the EFI runtime code regions with strict enforcement for IBT/BTI landing pad instructions. Given that the PE/COFF spec now defines a DllCharacteristicsEx flag that indicates whether or not a loaded image is compatible with this, we can wire this up to the flag in the memory attributes table, and set it if all loaded runtime image are compatible with it. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Oliver Smith-Denny <osde@linux.microsoft.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'MdeModulePkg/Core/Dxe/DxeMain.h')
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h
index 815a6b4..43daa03 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain.h
+++ b/MdeModulePkg/Core/Dxe/DxeMain.h
@@ -280,6 +280,8 @@ extern EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation[EfiMaxMemoryType + 1]
extern BOOLEAN gDispatcherRunning;
extern EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate;
+extern BOOLEAN gMemoryAttributesTableForwardCfi;
+
extern EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE gLoadModuleAtFixAddressConfigurationTable;
extern BOOLEAN gLoadFixedAddressCodeMemoryReady;
//