From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2F3CC5AD49 for ; Mon, 2 Jun 2025 22:19:58 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1003829.1383434 (Exim 4.92) (envelope-from ) id 1uMDVH-00065X-Q5; Mon, 02 Jun 2025 22:19:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1003829.1383434; Mon, 02 Jun 2025 22:19:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uMDVH-00065Q-Ls; Mon, 02 Jun 2025 22:19:35 +0000 Received: by outflank-mailman (input) for mailman id 1003829; Mon, 02 Jun 2025 22:19:34 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uMDVG-000651-HK for xen-devel@lists.xenproject.org; Mon, 02 Jun 2025 22:19:34 +0000 Received: from 11.mo581.mail-out.ovh.net (11.mo581.mail-out.ovh.net [87.98.173.157]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id a5f536fd-3fff-11f0-b894-0df219b8e170; Tue, 03 Jun 2025 00:19:28 +0200 (CEST) Received: from director2.ghost.mail-out.ovh.net (unknown [10.109.148.12]) by mo581.mail-out.ovh.net (Postfix) with ESMTP id 4bB7YW6vCFz1SPG for ; Mon, 2 Jun 2025 22:19:27 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-2249b (unknown [10.110.118.96]) by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id A8CB8C3B95; Mon, 2 Jun 2025 22:19:26 +0000 (UTC) Received: from 3mdeb.com ([37.59.142.100]) by ghost-submission-5b5ff79f4f-2249b with ESMTPSA id +vF7GW4jPmjPbgIAM3Irlw (envelope-from ); Mon, 02 Jun 2025 22:19:26 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a5f536fd-3fff-11f0-b894-0df219b8e170 Authentication-Results:garm.ovh; auth=pass (GARM-100R003952fb7fe-7527-41fd-b0a6-24c88fefecaa, 22913471B39E4060B5DF5B2870BF10C0EF5640C4) smtp.auth=sergii.dmytruk@3mdeb.com X-OVh-ClientIp:176.111.184.221 Date: Tue, 3 Jun 2025 01:19:04 +0300 From: Sergii Dmytruk To: Jan Beulich Cc: "Daniel P. Smith" , Ross Philipson , trenchboot-devel@googlegroups.com, xen-devel@lists.xenproject.org Subject: Re: [PATCH v2 02/22] include/xen/slr-table.h: Secure Launch Resource Table definitions Message-ID: References: <4896ab0b-f45e-43e9-bcee-f5496717eb2a@suse.com> <8521480a-f14d-4ac4-826e-6ed066619070@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8521480a-f14d-4ac4-826e-6ed066619070@suse.com> X-Ovh-Tracer-Id: 2553259515016229977 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgdefkeekheculddtuddrgeefvddrtddtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefuvghrghhiihcuffhmhihtrhhukhcuoehsvghrghhiihdrughmhihtrhhukhesfehmuggvsgdrtghomheqnecuggftrfgrthhtvghrnhepvdfgveegtdffhfdugeevieehkeetudevfeefgedtleejledvfeeutdetudeiveelnecukfhppeduvdejrddtrddtrddupddujeeirdduuddurddukeegrddvvddupdefjedrheelrddugedvrddutddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehsvghrghhiihdrughmhihtrhhukhesfehmuggvsgdrtghomhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeigvghnqdguvghvvghlsehlihhsthhsrdigvghnphhrohhjvggtthdrohhrghdpoffvtefjohhsthepmhhoheekudgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=8e5dtdmFkMnglKi+LBQl4WKLgk8ttsJC8rX2ANw4oew=; c=relaxed/relaxed; d=3mdeb.com; h=From; s=ovhmo3617313-selector1; t=1748902768; v=1; b=XKxH5J6e8suG/iFxgf+lmAbEMGzb1BrjPfmUgsiX9oA3cZbWS/qNdAgIEMs2974ro/TQ6NSx 9qCkrBDhP9055LQSzVO6A7sq+Q444YdNCPmLZJkyxG3u5ZaM8VK76rBI7+SWeVE5YZtOv90Vfsi 4IGAUPVhefifneiJfO58BpuiJSoW+9I3RGFsIgcf8GQ9QPoihIY5jK6FqMU/cyqphuM/jvQJjZ9 70D6jbMKxsPWJ5oo+G2w3lOOoSl0uxPi4nTApMDnXT4rHdGvk0aHVzO+QgbdmhFjSWiYLYT6IdF yZs/a51GdCYUHnHNiLy+gCjWzABIyzeqTAP0tlLZM7Svg== On Mon, Jun 02, 2025 at 09:31:11AM +0200, Jan Beulich wrote: > >>> +#define UEFI_SLR_TABLE_GUID \ > >>> + { 0x877a9b2aU, 0x0385, 0x45d1, { 0xa0, 0x34, 0x9d, 0xac, 0x9c, 0x9e, 0x56, 0x5f } } > >> > >> I'm not sure this is a good place to put UEFI GUIDs. Considering e.g ... > > > > It's here because the GUID is related more to SLRT than to EFI. I can > > move it if there is a more fitting place for table GUIDs. > > It'll (at least somewhat) depend on where it's going to be used. A common problem > when definitions / declarations are introduced without any use. It's only used in xen/common/efi/boot.c (patch #20), so looks like it should actually be defined there like the rest of GUIDs. > >>> +/* > >>> + * Primary SLR Table Header > >>> + */ > >>> +struct slr_table > >>> +{ > >>> + uint32_t magic; > >>> + uint16_t revision; > >>> + uint16_t architecture; > >>> + uint32_t size; > >>> + uint32_t max_size; > >>> + /* entries[] */ > >>> +} __packed; > >> > >> If x86-specific, the question on the need for some of the __packed arises > >> again. > > > > The table is used to communicate data from pre-DRTM world to DRTM-world > > and is produced and consumed by unrelated software components that don't > > necessarily pad structures the same way by default. > > How do other environments matter when this header is solely used by Xen? Xen uses this header to read data prepared for it. Packing is an easy way to ensure the data will be parsed consistently regardless of the architecture or software component which prepared it (i.e., a way to enforce proper "API"). Regards