public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael Kubacki" <mikuback@linux.microsoft.com>
To: devel@edk2.groups.io, ardb@kernel.org
Cc: Michael Kinney <michael.d.kinney@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Michael Kubacki <michael.kubacki@microsoft.com>,
	Sean Brogan <sean.brogan@microsoft.com>,
	Rebecca Cran <quic_rcran@quicinc.com>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Sami Mujawar <sami.mujawar@arm.com>,
	Taylor Beebe <t@taylorbeebe.com>
Subject: Re: [edk2-devel] [RFC PATCH 1/3] MdePkg: Update MemoryAttributesTable to v2.10
Date: Thu, 2 Feb 2023 19:26:54 -0500	[thread overview]
Message-ID: <48a6eaff-1826-e51c-1703-1ebfe75a0ddd@linux.microsoft.com> (raw)
In-Reply-To: <20230202180335.2256160-2-ardb@kernel.org>

Acked-by: Michael Kubacki <michael.kubacki@microsoft.com>

Might be convenient to have a link in the commit message to the 
definition in the 2.10 spec:

https://uefi.org/specs/UEFI/2.10/04_EFI_System_Table.html?highlight=memory_attribute#efi-memory-attributes-table

On 2/2/2023 1:03 PM, Ard Biesheuvel wrote:
> UEFI v2.10 introduces a new flag to the memory attributes table to
> inform the OS whether or not runtime services code regions were emitted
> by the compiler with guard instructions for forward edge control flow
> integrity enforcement.
> 
> So update our definition accordingly.
> 
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> ---
>   MdePkg/Include/Guid/MemoryAttributesTable.h | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/MdePkg/Include/Guid/MemoryAttributesTable.h b/MdePkg/Include/Guid/MemoryAttributesTable.h
> index 82f83a67b96d..238c14ff92df 100644
> --- a/MdePkg/Include/Guid/MemoryAttributesTable.h
> +++ b/MdePkg/Include/Guid/MemoryAttributesTable.h
> @@ -17,11 +17,15 @@ typedef struct {
>     UINT32    Version;
> 
>     UINT32    NumberOfEntries;
> 
>     UINT32    DescriptorSize;
> 
> -  UINT32    Reserved;
> 
> +  UINT32    Flags;
> 
>     // EFI_MEMORY_DESCRIPTOR Entry[1];
> 
>   } EFI_MEMORY_ATTRIBUTES_TABLE;
> 
>   
> 
> -#define EFI_MEMORY_ATTRIBUTES_TABLE_VERSION  0x00000001
> 
> +#define EFI_MEMORY_ATTRIBUTES_TABLE_VERSION  0x00000002
> 
> +
> 
> +#define EFI_MEMORY_ATTRIBUTES_FLAGS_RT_FORWARD_CONTROL_FLOW_GUARD  0x1
> 
> +// BIT0 implies that Runtime code includes the forward control flow guard
> 
> +// instruction, such as X86 CET-IBT or ARM BTI.
> 
>   
> 
>   extern EFI_GUID  gEfiMemoryAttributesTableGuid;
> 
>   
> 

  parent reply	other threads:[~2023-02-03  0:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 18:03 [RFC PATCH 0/3] enable IBT/BTI codegen and reporting to the OS Ard Biesheuvel
2023-02-02 18:03 ` [RFC PATCH 1/3] MdePkg: Update MemoryAttributesTable to v2.10 Ard Biesheuvel
2023-02-02 18:44   ` [edk2-devel] " Michael D Kinney
2023-02-03  0:26   ` Michael Kubacki [this message]
2023-02-02 18:03 ` [RFC PATCH 2/3] MdeModulePkg: Enable forward edge CFI in mem attributes table Ard Biesheuvel
2023-02-02 18:48   ` Michael D Kinney
2023-02-02 19:00     ` Ard Biesheuvel
2023-02-03  0:24       ` [edk2-devel] " Michael Kubacki
2023-02-03  1:16         ` Yao, Jiewen
2023-02-03  8:26           ` Ard Biesheuvel
2023-02-03  9:52             ` Marvin Häuser
2023-02-03 10:10               ` Yao, Jiewen
2023-03-24 21:48         ` Michael Kubacki
2023-02-03  8:25       ` Marvin Häuser
2023-02-03  8:28         ` Ard Biesheuvel
2023-02-03  8:34           ` Marvin Häuser
2023-02-02 18:03 ` [RFC PATCH 3/3] ArmVirtPkg/ArmVirtQemu: Implement BTI for runtime regions Ard Biesheuvel

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=48a6eaff-1826-e51c-1703-1ebfe75a0ddd@linux.microsoft.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