public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: Ard Biesheuvel <ardb@kernel.org>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Andrew Fish" <afish@apple.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Liu, Zhiguang" <zhiguang.liu@intel.com>,
	"Rebecca Cran" <rebecca@bsdio.com>,
	"Tom Lendacky" <thomas.lendacky@amd.com>,
	"Marvin Häuser" <mhaeuser@posteo.de>
Subject: Re: [PATCH v4 3/6] UefiCpuPkg/PeiCpuExceptionHandlerLib: Use SEC/PEI specific asm component
Date: Thu, 6 Apr 2023 06:00:24 +0000	[thread overview]
Message-ID: <MN6PR11MB824446A5E238EE1FB1ED71718C919@MN6PR11MB8244.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230403142920.1921619-4-ardb@kernel.org>

Reviewed-by: Ray Ni <ray.ni@intel.com>

> -----Original Message-----
> From: Ard Biesheuvel <ardb@kernel.org>
> Sent: Monday, April 3, 2023 10:29 PM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <ardb@kernel.org>; Ni, Ray <ray.ni@intel.com>; Andrew
> Fish <afish@apple.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
> Liu, Zhiguang <zhiguang.liu@intel.com>; Rebecca Cran
> <rebecca@bsdio.com>; Tom Lendacky <thomas.lendacky@amd.com>;
> Marvin Häuser <mhaeuser@posteo.de>
> Subject: [PATCH v4 3/6] UefiCpuPkg/PeiCpuExceptionHandlerLib: Use
> SEC/PEI specific asm component
> 
> The PEI flavor of CpuExceptionHandlerLib never populates more than 32
> IDT vectors, and there is no CET shadow stack support in the PEI phase.
> So there is no need to use the generic ExceptionHandler NASM source,
> which carries a 256-entry template and CET support, and writes to its
> own .text section when built using XCODE, which is not permitted in the
> PEI phase. So let's switch to the reduced SEC/PEI version of this
> component, which is sufficient for PEI and doesn't suffer from the same
> issue.
> 
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> ---
> 
> UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
> | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git
> a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i
> nf
> b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i
> nf
> index 5339f8e604045801..3bcaff5c5fe4633a 100644
> ---
> a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i
> nf
> +++
> b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i
> nf
> @@ -28,7 +28,7 @@ [Sources.Ia32]
>    Ia32/ArchInterruptDefs.h
> 
> 
> 
>  [Sources.X64]
> 
> -  X64/Xcode5ExceptionHandlerAsm.nasm
> 
> +  X64/SecPeiExceptionHandlerAsm.nasm
> 
>    X64/ArchExceptionHandler.c
> 
>    X64/ArchInterruptDefs.h
> 
> 
> 
> @@ -62,3 +62,5 @@ [Pcd]
>  [FeaturePcd]
> 
>    gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard                    ##
> CONSUMES
> 
> 
> 
> +[BuildOptions]
> 
> +  XCODE:*_*_X64_NASM_FLAGS = -D NO_ABSOLUTE_RELOCS_IN_TEXT
> 
> --
> 2.39.2


  reply	other threads:[~2023-04-06  6:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03 14:29 [PATCH v4 0/6] UefiCpuPkg, OvmfPkg: Simplify CpuExceptionHandlerLib Ard Biesheuvel
2023-04-03 14:29 ` [PATCH v4 1/6] BaseTools/tools_def CLANGDWARF: Permit text relocations Ard Biesheuvel
2023-04-05 17:11   ` Rebecca Cran
2023-04-03 14:29 ` [PATCH v4 2/6] UefiCpuPkg/CpuExceptionHandlerLib: Use single SEC/PEI version Ard Biesheuvel
2023-04-06  5:54   ` Ni, Ray
2023-04-03 14:29 ` [PATCH v4 3/6] UefiCpuPkg/PeiCpuExceptionHandlerLib: Use SEC/PEI specific asm component Ard Biesheuvel
2023-04-06  6:00   ` Ni, Ray [this message]
2023-04-03 14:29 ` [PATCH v4 4/6] UefiCpuPkg/CpuExceptionHandlerLib: Make runtime fixups XCODE-only Ard Biesheuvel
2023-04-03 14:29 ` [PATCH v4 5/6] OvmfPkg: Drop special Xcode5 version of exception handler library Ard Biesheuvel
2023-04-03 14:29 ` [PATCH v4 6/6] UefiCpuPkg/CpuExceptionHandlerLib: Drop special XCODE5 version Ard Biesheuvel
2023-04-03 22:18 ` [edk2-devel] [PATCH v4 0/6] UefiCpuPkg, OvmfPkg: Simplify CpuExceptionHandlerLib Lendacky, Thomas
2023-04-04  7:57 ` Marvin Häuser
2023-04-04  9:46   ` [edk2-devel] " Ard Biesheuvel
2023-04-05 17:11     ` Rebecca Cran
2023-04-06  6:55     ` Ni, Ray

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=MN6PR11MB824446A5E238EE1FB1ED71718C919@MN6PR11MB8244.namprd11.prod.outlook.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