From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, guomin.jiang@intel.com
Cc: Michael Kubacki <michael.a.kubacki@intel.com>,
Eric Dong <eric.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
Rahul Kumar <rahul1.kumar@intel.com>,
Debkumar De <debkumar.de@intel.com>,
Harry Han <harry.han@intel.com>,
Catharine West <catharine.west@intel.com>
Subject: Re: [edk2-devel] [PATCH v5 4/9] UefiCpuPkg/SecMigrationPei: Add initial PEIM (CVE-2019-11098)
Date: Thu, 9 Jul 2020 13:01:26 +0200 [thread overview]
Message-ID: <160e3737-b813-1217-e11e-bfaf8144f304@redhat.com> (raw)
In-Reply-To: <20200709015645.336-5-guomin.jiang@intel.com>
On 07/09/20 03:56, Guomin Jiang wrote:
> From: Michael Kubacki <michael.a.kubacki@intel.com>
>
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1614
>
> Adds a PEIM that republishes structures produced in SEC. This
> is done because SEC modules may not be shadowed in some platforms
> due to space constraints or special alignment requirements. The
> SecMigrationPei module locates interfaces that may be published in
> SEC and reinstalls the interface with permanent memory addresses.
>
> This is important if pre-memory address access is forbidden after
> memory initialization and data such as a PPI descriptor, PPI GUID,
> or PPI inteface reside in pre-memory.
>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Rahul Kumar <rahul1.kumar@intel.com>
> Cc: Debkumar De <debkumar.de@intel.com>
> Cc: Harry Han <harry.han@intel.com>
> Cc: Catharine West <catharine.west@intel.com>
> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
> Acked-by: Laszlo Ersek <lersek@redhat.com>
> ---
> UefiCpuPkg/UefiCpuPkg.dec | 4 +
> UefiCpuPkg/UefiCpuPkg.dsc | 1 +
> UefiCpuPkg/SecCore/SecCore.inf | 2 +
> .../SecMigrationPei/SecMigrationPei.inf | 67 +++
> UefiCpuPkg/Include/Ppi/RepublishSecPpi.h | 54 +++
> UefiCpuPkg/SecCore/SecMain.h | 1 +
> UefiCpuPkg/SecMigrationPei/SecMigrationPei.h | 154 +++++++
> UefiCpuPkg/SecCore/SecMain.c | 26 +-
> UefiCpuPkg/SecMigrationPei/SecMigrationPei.c | 381 ++++++++++++++++++
> .../SecMigrationPei/SecMigrationPei.uni | 13 +
> 10 files changed, 701 insertions(+), 2 deletions(-)
> create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.inf
> create mode 100644 UefiCpuPkg/Include/Ppi/RepublishSecPpi.h
> create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.h
> create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.c
> create mode 100644 UefiCpuPkg/SecMigrationPei/SecMigrationPei.uni
> +/**
> + This function is the entry point which installs an instance of REPUBLISH_SEC_PPI_PPI.
> +
> + It install the RepublishSecPpi depent on PcdMigrateTemporaryRamFirmwareVolumes, install
> + the PPI when the PcdMigrateTemporaryRamFirmwareVolumes enabled.
> +
> + @param[in] FileHandle Pointer to image file handle.
> + @param[in] PeiServices Pointer to PEI Services Table
> +
> + @retval EFI_ABORTED Disable evacuate temporary memory feature by disable
> + PcdMigrateTemporaryRamFirmwareVolumes.
> + EFI_SUCCESS An instance of REPUBLISH_SEC_PPI_PPI was installed successfully.
I think "@retval" should be used in front of every single return value,
that is, EFI_SUCCESS as well.
But, please do not resubmit the series just because of this remark; it's
not important enough.
If you need to post a v6 for another reason, then please consider adding
the "@retval" word here.
My Acked-by stands with or without "@retval".
Thanks!
Laszlo
> + @retval Others An error occurred installing and instance of REPUBLISH_SEC_PPI_PPI.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +SecMigrationPeiInitialize (
> + IN EFI_PEI_FILE_HANDLE FileHandle,
> + IN CONST EFI_PEI_SERVICES **PeiServices
> + )
> +{
> + EFI_STATUS Status;
> +
> + Status = EFI_ABORTED;
> +
> + if (PcdGetBool (PcdMigrateTemporaryRamFirmwareVolumes)) {
> + Status = PeiServicesInstallPpi (&mEdkiiRepublishSecPpiDescriptor);
> + ASSERT_EFI_ERROR (Status);
> + }
> +
> + return Status;
> +}
next prev parent reply other threads:[~2020-07-09 11:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 1:56 [PATCH v5 0/9] Add new feature that evacuate temporary to permanent memory (CVE-2019-11098) Guomin Jiang
2020-07-09 1:56 ` [PATCH v5 1/9] MdeModulePkg: Add new PCD to control the evacuate temporary memory feature (CVE-2019-11098) Guomin Jiang
2020-07-13 2:54 ` Wang, Jian J
2020-07-09 1:56 ` [PATCH v5 2/9] MdeModulePkg/PeiCore: Enable T-RAM evacuation in PeiCore (CVE-2019-11098) Guomin Jiang
2020-07-09 10:50 ` [edk2-devel] " Laszlo Ersek
2020-07-13 6:38 ` Wang, Jian J
2020-07-22 22:43 ` Laszlo Ersek
2020-07-09 1:56 ` [PATCH v5 3/9] UefiCpuPkg/CpuMpPei: Add GDT and IDT migration support (CVE-2019-11098) Guomin Jiang
2020-07-09 11:04 ` [edk2-devel] " Laszlo Ersek
2020-07-09 1:56 ` [PATCH v5 4/9] UefiCpuPkg/SecMigrationPei: Add initial PEIM (CVE-2019-11098) Guomin Jiang
2020-07-09 11:01 ` Laszlo Ersek [this message]
2020-07-13 6:56 ` [edk2-devel] " Wang, Jian J
2020-07-09 1:56 ` [PATCH v5 5/9] MdeModulePkg/Core: Create Migrated FV Info Hob for calculating hash (CVE-2019-11098) Guomin Jiang
2020-07-13 7:05 ` Wang, Jian J
2020-07-09 1:56 ` [PATCH v5 6/9] SecurityPkg/Tcg2Pei: Use " Guomin Jiang
2020-07-13 7:09 ` Wang, Jian J
2020-07-09 1:56 ` [PATCH v5 7/9] UefiCpuPkg/CpuMpPei: Enable paging and set NP flag to avoid TOCTOU (CVE-2019-11098) Guomin Jiang
2020-07-13 7:47 ` [edk2-devel] " Wang, Jian J
2020-07-09 1:56 ` [PATCH v5 8/9] UefiCpuPkg: Correct some typos Guomin Jiang
2020-07-09 10:58 ` [edk2-devel] " Laszlo Ersek
2020-07-09 1:56 ` [PATCH v5 9/9] SecurityPkg/TcgPei: Use Migrated FV Info Hob for calculating hash (CVE-2019-11098) Guomin Jiang
2020-07-13 7:49 ` Wang, Jian J
2020-07-10 5:46 ` [edk2-devel] [PATCH v5 0/9] Add new feature that evacuate temporary to permanent memory (CVE-2019-11098) Laszlo Ersek
2020-07-10 6:57 ` Guomin Jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=160e3737-b813-1217-e11e-bfaf8144f304@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox