mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
Revert "MdeModulePkg: Enable forward edge CFI in mem attributes table"
This reverts commit e4ef609319236a018c60b84f68d9d923c4ba383e.
This commit is contained in:
parent
20dd836214
commit
51c4b78146
@ -262,8 +262,6 @@ extern EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation[EfiMaxMemoryType
|
|||||||
extern BOOLEAN gDispatcherRunning;
|
extern BOOLEAN gDispatcherRunning;
|
||||||
extern EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate;
|
extern EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate;
|
||||||
|
|
||||||
extern BOOLEAN gMemoryAttributesTableForwardCfi;
|
|
||||||
|
|
||||||
extern EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE gLoadModuleAtFixAddressConfigurationTable;
|
extern EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE gLoadModuleAtFixAddressConfigurationTable;
|
||||||
extern BOOLEAN gLoadFixedAddressCodeMemoryReady;
|
extern BOOLEAN gLoadFixedAddressCodeMemoryReady;
|
||||||
extern LOADED_IMAGE_PRIVATE_DATA * mCurrentImage;
|
extern LOADED_IMAGE_PRIVATE_DATA * mCurrentImage;
|
||||||
|
@ -1336,16 +1336,6 @@ CoreLoadImageCommon (
|
|||||||
CoreNewDebugImageInfoEntry (EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL, &Image->Info, Image->Handle, &ImageContext);
|
CoreNewDebugImageInfoEntry (EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL, &Image->Info, Image->Handle, &ImageContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Check whether we are loading a runtime image that lacks support for
|
|
||||||
// IBT/BTI landing pads.
|
|
||||||
//
|
|
||||||
if ((Image->ImageContext.ImageCodeMemoryType == EfiRuntimeServicesCode) &&
|
|
||||||
((Image->ImageContext.DllCharacteristicsEx & EFI_IMAGE_DLLCHARACTERISTICS_EX_FORWARD_CFI_COMPAT) == 0))
|
|
||||||
{
|
|
||||||
gMemoryAttributesTableForwardCfi = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Reinstall loaded image protocol to fire any notifications
|
// Reinstall loaded image protocol to fire any notifications
|
||||||
//
|
//
|
||||||
|
@ -92,7 +92,6 @@ BOOLEAN mMemoryAttributesTableEnable = TRUE;
|
|||||||
BOOLEAN mMemoryAttributesTableEndOfDxe = FALSE;
|
BOOLEAN mMemoryAttributesTableEndOfDxe = FALSE;
|
||||||
EFI_MEMORY_ATTRIBUTES_TABLE *mMemoryAttributesTable = NULL;
|
EFI_MEMORY_ATTRIBUTES_TABLE *mMemoryAttributesTable = NULL;
|
||||||
BOOLEAN mMemoryAttributesTableReadyToBoot = FALSE;
|
BOOLEAN mMemoryAttributesTableReadyToBoot = FALSE;
|
||||||
BOOLEAN gMemoryAttributesTableForwardCfi = TRUE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Install MemoryAttributesTable.
|
Install MemoryAttributesTable.
|
||||||
@ -186,12 +185,7 @@ InstallMemoryAttributesTable (
|
|||||||
MemoryAttributesTable->Version = EFI_MEMORY_ATTRIBUTES_TABLE_VERSION;
|
MemoryAttributesTable->Version = EFI_MEMORY_ATTRIBUTES_TABLE_VERSION;
|
||||||
MemoryAttributesTable->NumberOfEntries = RuntimeEntryCount;
|
MemoryAttributesTable->NumberOfEntries = RuntimeEntryCount;
|
||||||
MemoryAttributesTable->DescriptorSize = (UINT32)DescriptorSize;
|
MemoryAttributesTable->DescriptorSize = (UINT32)DescriptorSize;
|
||||||
if (gMemoryAttributesTableForwardCfi) {
|
|
||||||
MemoryAttributesTable->Flags = EFI_MEMORY_ATTRIBUTES_FLAGS_RT_FORWARD_CONTROL_FLOW_GUARD;
|
|
||||||
} else {
|
|
||||||
MemoryAttributesTable->Flags = 0;
|
MemoryAttributesTable->Flags = 0;
|
||||||
}
|
|
||||||
|
|
||||||
DEBUG ((DEBUG_VERBOSE, "MemoryAttributesTable:\n"));
|
DEBUG ((DEBUG_VERBOSE, "MemoryAttributesTable:\n"));
|
||||||
DEBUG ((DEBUG_VERBOSE, " Version - 0x%08x\n", MemoryAttributesTable->Version));
|
DEBUG ((DEBUG_VERBOSE, " Version - 0x%08x\n", MemoryAttributesTable->Version));
|
||||||
DEBUG ((DEBUG_VERBOSE, " NumberOfEntries - 0x%08x\n", MemoryAttributesTable->NumberOfEntries));
|
DEBUG ((DEBUG_VERBOSE, " NumberOfEntries - 0x%08x\n", MemoryAttributesTable->NumberOfEntries));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user