[edk2-devel] [PATCH v7 02/10] MdeModulePkg/PeiCore: Enable T-RAM evacuation in PeiCore (CVE-2019-11098)

Laszlo Ersek lersek at redhat.com
Wed Jul 22 21:20:11 UTC 2020


On 07/22/20 10:36, Guomin Jiang wrote:
> From: Michael Kubacki <michael.a.kubacki at intel.com>
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1614
> 
> Introduces new changes to PeiCore to move the contents of temporary
> RAM visible to the PeiCore to permanent memory. This expands on
> pre-existing shadowing support in the PeiCore to perform the following
> additional actions:
> 
>  1. Migrate pointers in PPIs installed in PeiCore to the permanent
>     memory copy of PeiCore.
> 
>  2. Copy all installed firmware volumes to permanent memory.
> 
>  3. Relocate and fix up the PEIMs within the firmware volumes.
> 
>  4. Convert all PPIs into the migrated firmware volume to the corresponding
>     PPI address in the permanent memory location.
> 
>     This applies to PPIs and PEI notifications.
> 
>  5. Convert all status code callbacks in the migrated firmware volume to
>     the corresponding address in the permanent memory location.
> 
>  6. Update the FV HOB to the corresponding firmware volume in permanent
>     memory.
> 
>  7. Add PcdMigrateTemporaryRamFirmwareVolumes to control if enable the
>     feature or not. when the PCD disable, the EvacuateTempRam() will
>     never be called.
> 
> The function control flow as below:
>   PeiCore()
>     DumpPpiList()
>     EvacuateTempRam()
>       ConvertPeiCorePpiPointers()
>         ConvertPpiPointersFv()
>       MigratePeimsInFv()
>         MigratePeim()
>           PeiGetPe32Data()
>           LoadAndRelocatePeCoffImageInPlace()
>       MigrateSecModulesInFv()
>       ConvertPpiPointersFv()
>       ConvertStatusCodeCallbacks()
>       ConvertFvHob()
>       RemoveFvHobsInTemporaryMemory()
>     DumpPpiList()
> 
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Hao A Wu <hao.a.wu at intel.com>
> Cc: Dandan Bi <dandan.bi at intel.com>
> Cc: Liming Gao <liming.gao at intel.com>
> Cc: Debkumar De <debkumar.de at intel.com>
> Cc: Harry Han <harry.han at intel.com>
> Cc: Catharine West <catharine.west at intel.com>
> Signed-off-by: Michael Kubacki <michael.a.kubacki at intel.com>
> Acked-by: Laszlo Ersek <lersek at redhat.com>
> ---
>  MdeModulePkg/Core/Pei/PeiMain.inf             |   2 +
>  MdeModulePkg/Core/Pei/PeiMain.h               | 169 ++++++++
>  MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 392 ++++++++++++++++++
>  MdeModulePkg/Core/Pei/Image/Image.c           | 116 ++++++
>  MdeModulePkg/Core/Pei/Memory/MemoryServices.c |  82 ++++
>  MdeModulePkg/Core/Pei/PeiMain/PeiMain.c       |  24 ++
>  MdeModulePkg/Core/Pei/Ppi/Ppi.c               | 287 +++++++++++++
>  7 files changed, 1072 insertions(+)

I've reviewed this incrementally against v5, which I had ACKed.

My ACK stands.

Thanks
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#63154): https://edk2.groups.io/g/devel/message/63154
Mute This Topic: https://groups.io/mt/75720847/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list