From nobody Fri Oct 18 08:38:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+101939+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101939+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1679914938; cv=none; d=zohomail.com; s=zohoarc; b=kjdMg0GbRumngm4skenZ21E2NnB8Jiggexw6/pDDXj8mzRwKYfoDODRzHcRKm5Vmap4QROWMAiVXvOnPwZJkDTGGDRtZYW70f9EeQDTyWradpvMWxhrFlmG1YQOc1cdgCC8RXOYRSyA8D0iFUU/a5yqr1vNqn7WB7OafSyP57vw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679914938; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=MAPtKXdwATlE4Rom1V+kUkc5iyGjPrJJzHr0Lw7NLN8=; b=jDP3Hyp4iWgWyxWqPbjotfCDpW9Jsd8SkQFqtcVSfU8jW2eoE5aACBlpjEzx19wbAPMrn6QOPvDg4pTB/DQP6tZxdTlVcx1ridv4/hlb8GtE/zFjL6jAD2GFNYC3vBVutwrVUwXZsotuxYx3/kuzUwAwazDbGa/uqm6E/7PJtxM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101939+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1679914938324333.99558015333287; Mon, 27 Mar 2023 04:02:18 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id FrpEYY1788612xqShvRDgnEy; Mon, 27 Mar 2023 04:02:17 -0700 X-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 X-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) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C225FC4339B; Mon, 27 Mar 2023 11:02:13 +0000 (UTC) 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: [edk2-devel] [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> In-Reply-To: <20230327110112.262503-1-ardb@kernel.org> References: <20230327110112.262503-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ardb@kernel.org X-Gm-Message-State: 8Zxecp4RB3XEehNgcttnR8Yux1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1679914937; bh=hR2OagExn3WteRMt1VG/5qiVhkzYWmEt3lAx/NliEcQ=; h=Cc:Date:From:Reply-To:Subject:To; b=TLx31WkrYj1+PHA6r/BSRriUQBZ6Zfj3eF3am2hf7+wydJIZXa2BgMMM3i8KAjqcjOi u8+tJuRKsqe8aOqFH9+lSguzobzHKyEktNuavy78DUnQ7d1sJDYq2irqbtCwH+KZoqCv+ bSJet6f+U5IqAA4HXuRLJ88oK0j1T/YDB8g= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1679914939409100006 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Leif Lindholm --- 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; UINT32 NumberOfEntries; UINT32 DescriptorSize; - UINT32 Reserved; + UINT32 Flags; // EFI_MEMORY_DESCRIPTOR Entry[1]; } EFI_MEMORY_ATTRIBUTES_TABLE; =20 -#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. =20 extern EFI_GUID gEfiMemoryAttributesTableGuid; =20 --=20 2.39.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101939): https://edk2.groups.io/g/devel/message/101939 Mute This Topic: https://groups.io/mt/97879302/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-