From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.32028.1679914937352321382 for ; Mon, 27 Mar 2023 04:02:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TvzI1KaA; spf=pass (domain: kernel.org, ip: 139.178.84.217, 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 dfw.source.kernel.org (Postfix) with ESMTPS id D88E961043; Mon, 27 Mar 2023 11:02:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C225FC4339B; Mon, 27 Mar 2023 11:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679914936; bh=x1hBAGtCDUSsT2GwMcDSLibsoTdrAX9PAPPdOkjvBvg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TvzI1KaAYjPX7izSx2uyyNAi9UsMd0wqBzgrStTJ7qFY9asNI15bixbKBOwIe4P7L 1a7nyteIt/vFTj53swoZjY6lBo3nMJKV0gcQeFvgTjkkPZIShv3kWomx8KXiQwUlOu THTEH4rNQlYpbIP9+ZMcBymZwagtw9Oc7ozsQ6j4jutlAUxwnTzHpr5fBXoMbgg/2i p2uldmitX1Gbo13tVkjMy+N6kvQuiOXOhN3uc47FcdQFFuKC/j3gfx/lK0j3X9SPH4 m6XHRLKNOwLw09aFb7HcwWn6vxSwgv7Y9izkoEyduhBwyjD/qFcr6ic1XpRegz3hUE q+fxZsA11Jubw== 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 , =?UTF-8?q?Marvin=20H=C3=A4user?= , Bob Feng Subject: [PATCH v2 15/17] MdePkg: Update MemoryAttributesTable to v2.10 Date: Mon, 27 Mar 2023 13:01:10 +0200 Message-Id: <20230327110112.262503-16-ardb@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230327110112.262503-1-ardb@kernel.org> References: <20230327110112.262503-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. Link: https://uefi.org/specs/UEFI/2.10/04_EFI_System_Table.html#efi-memory-= attributes-table Signed-off-by: Ard Biesheuvel Reviewed-by: Michael D Kinney Acked-by: Michael Kubacki --- 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 82f83a67b96d38c5..238c14ff92dfed31 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.2