audk/MdeModulePkg/Core
Ard Biesheuvel 5920a9d16b MdeModulePkg/MemoryProtection: split protect and unprotect paths
Currently, the PE/COFF image memory protection code uses the same code
paths for protecting and unprotecting an image. This is strange, since
unprotecting an image involves a single call into the CPU arch protocol
to clear the permission attributes of the entire range, and there is no
need to parse the PE/COFF headers again.

So let's store the ImageRecord entries in a linked list, so we can find
it again at unprotect time, and simply clear the permissions.

Note that this fixes a DEBUG hang on an ASSERT() that occurs when the
PE/COFF image fails to load, which causes UnprotectUefiImage() to be
invoked before the image is fully loaded.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2017-03-21 21:29:26 +00:00
..
Dxe MdeModulePkg/MemoryProtection: split protect and unprotect paths 2017-03-21 21:29:26 +00:00
DxeIplPeim MdeModulePkg/Core/DxeIplPeim: Add support for PCD PcdPteMemoryEncryptionAddressOrMask 2017-03-01 12:51:01 +08:00
Pei MdeModulePkg/PeiCore: honour minimal runtime allocation granularity 2017-03-06 11:29:28 +01:00
PiSmmCore MdeModulePkg PiSmmCore: Remove unreferenced symbol for SMRAM profile 2017-03-15 16:47:10 +08:00
RuntimeDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00