audk/MdeModulePkg
Ard Biesheuvel d8dd54f071 MdeModulePkg/DxeCore: defer PE/COFF emulator registration to StartImage
EDK2's implementation of the LoadImage() boot service permits non-native
binaries to be loaded (i.e., X64 images on IA32 firmware), but any
attempts to start such an image using StartImage() will return
EFI_UNSUPPORTED.

The integration of the PE/COFF emulator protocol into the DXE core
deviates slightly from this paradigm, given that its IsImageSupported
hook as well as its RegisterImage hook are invoked from LoadImage,
and by the time StartImage is called, no opportunity is given to the
provider of the PE/COFF emulator protocol to prevent an image from
being started if it only supports loading it.

To address this disparity, let's move the invocation of RegisterImage()
to the implementation of the StartImage() boot service, allowing the
emulator to permit LoadImage() but reject StartImage() on images that
turn out not to meet the requirements of the emulator as it is being
started.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2564
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Liming Gao <liming.gao@intel.com>
2020-03-04 09:26:45 +00:00
..
Application MdeModulePkg/Application: Fix various typos 2020-02-10 22:30:07 +00:00
Bus MdeModulePkg/SdMmcPciHcDxe: Fix double PciIo Unmap in TRB creation (CVE-2019-14587) 2020-02-18 05:03:49 +00:00
Core MdeModulePkg/DxeCore: defer PE/COFF emulator registration to StartImage 2020-03-04 09:26:45 +00:00
Include MdeModulePkg: remove EnterS3WithImmediateWake () from ResetSystemLib 2020-01-10 07:00:51 +00:00
Library MdeModulePkg: Add DxeResetSystemLib unit test 2020-02-07 19:18:53 +00:00
Logo MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Test MdeModulePkg: Add DxeResetSystemLib unit test 2020-02-07 19:18:53 +00:00
Universal MdeModulePkg/DisplayEngine: Zero memory before free (CVE-2019-14558) 2020-02-14 08:18:47 +00:00
MdeModulePkg.ci.yaml MdeModulePkg: Add DxeResetSystemLib unit test 2020-02-07 19:18:53 +00:00
MdeModulePkg.dec MdeModulePkg/Capsule: Remove RT restriction in UpdateCapsule service. 2020-02-07 07:43:00 +00:00
MdeModulePkg.dsc MdeModulePkg: LzmaCustomDecompressLib.inf don't support EBC anymore 2019-12-05 00:21:35 +00:00
MdeModulePkg.uni MdeModulePkg: Issues reported by ECC in EDK2. 2020-02-14 07:27:28 +00:00
MdeModulePkgExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00