From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web11.1549.1675361033522015792 for ; Thu, 02 Feb 2023 10:03:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gK+HHFa/; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E66E4B826AB; Thu, 2 Feb 2023 18:03:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 652ACC433EF; Thu, 2 Feb 2023 18:03:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675361029; bh=Rp2Cj2hUWtf+613gf81GmSEvSKWj3qH13rB4Bw1z7vc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gK+HHFa/zdGIaskHga6ubhNhQ7doVkM7os7ETBvkGRrAjtB1gyFeSISZjSjCV9UEY PjYep7nqLlxjuzJ6Mr6ZQPVKDEwaWQxvk+QDY9KmAywNUIfACRQUc92yNviKAyVtG/ SdXtI9M3cRsfLCjmlr64RSs17+2De+wjUqylnvUo3yKAy5FFv6qKjxidhJbBCSxHuq pUKLUcM6m9vGOHL+soiPL9QHw6EoKJqHwoN8AFfCKO3fHRSOcPpzMliP0cqPr+iPxZ HtZ7C8H21+0r6HAlTNJUUSKF+03oPATyJnGE7+gMj2jsMX0bQZM4ogPZGkJHI1n47D 3vBgGzJX6fNsw== From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Michael Kinney , Liming Gao , Jiewen Yao , Michael Kubacki , Sean Brogan , Rebecca Cran , Leif Lindholm , Sami Mujawar , Taylor Beebe Subject: [RFC PATCH 1/3] MdePkg: Update MemoryAttributesTable to v2.10 Date: Thu, 2 Feb 2023 19:03:33 +0100 Message-Id: <20230202180335.2256160-2-ardb@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230202180335.2256160-1-ardb@kernel.org> References: <20230202180335.2256160-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --- MdePkg/Include/Guid/MemoryAttributesTable.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Guid/MemoryAttributesTable.h b/MdePkg/Include/G= uid/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;=0D UINT32 NumberOfEntries;=0D UINT32 DescriptorSize;=0D - UINT32 Reserved;=0D + UINT32 Flags;=0D // EFI_MEMORY_DESCRIPTOR Entry[1];=0D } EFI_MEMORY_ATTRIBUTES_TABLE;=0D =0D -#define EFI_MEMORY_ATTRIBUTES_TABLE_VERSION 0x00000001=0D +#define EFI_MEMORY_ATTRIBUTES_TABLE_VERSION 0x00000002=0D +=0D +#define EFI_MEMORY_ATTRIBUTES_FLAGS_RT_FORWARD_CONTROL_FLOW_GUARD 0x1=0D +// BIT0 implies that Runtime code includes the forward control flow guard= =0D +// instruction, such as X86 CET-IBT or ARM BTI.=0D =0D extern EFI_GUID gEfiMemoryAttributesTableGuid;=0D =0D --=20 2.39.1