Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2238rwd; Mon, 15 May 2023 18:55:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ll8XbMJvhCwBebYrbTIhM8TvB8O4xHS8OR8kYO02cJy1iW7JSxZDg7gx84iQ/P+TeVLWz X-Received: by 2002:a05:6a20:7f8b:b0:f0:c858:2d68 with SMTP id d11-20020a056a207f8b00b000f0c8582d68mr45566546pzj.35.1684202139096; Mon, 15 May 2023 18:55:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684202139; cv=none; d=google.com; s=arc-20160816; b=LUpTc7fyGbdhGr67HxpK9r6XnEsaRyrRyk90KUnIzQHtwCcf3aWfNy9udevyXf62nL 9xkS2OfYSX5eK/mY439nv6wcoDcofskv3wmq1UCD1pj1QDcu9+o0AGb4Oiy+2PsEYkXf v42aKI+y2EkafyqUWvsp3254/HJuOidEsyEc3AtJXq3uas7hAG+TUDBhqSG1x4u7qIvp bnYD0UTSRLDEBllVHYx9VYKE/rIZJ3Uvt6krbMoQ0ZW9iv3CBIdZTWcZ6tl0DtwovHk0 ZANLcxszHVKpnzM9fx/HJ8LZPxkAquJ9G3SN6hLsXYOc9qYbJcTzi3I3mvejvsDUW6im Q8Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=8xYDyiFvuLzfM3gIyQmi7ue/D9kSkmvtYYlnuzOCz1Q=; b=I5+7cBvcUfGwB/+yOyM25aJq21yzJN2trvjFj/4PLdgGC9zfAzAffBsfsrfY/sq8co 13JAoXV4F4Cz6nCesz/PB/EFVV54S1b2Qw0OrSe+n7dF43HcUEmHaB/basPIYvRkF56r vZ0Ho+YYu/C/6IS5RXU4mCBLOoPmiLA/Axev5vWWH6BUkg74ZM8fxbh9Ls/7lcFeVGbD 8rbqsVTx5ig0byzCKQVu9qab/IbmgpsNEvAck84sX5NSv7m7HXbissXxSgSL9ntsQoPd piqdfJZYTFsXCvogYcBp8h+LmfEh9XuB1twkaqh4R6B3kSoFbaTz7n1XmLNgnp0JbNUy +J6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t17-20020a639551000000b0050bd4b86169si17675981pgn.414.2023.05.15.18.55.25; Mon, 15 May 2023 18:55:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229655AbjEPBpy (ORCPT + 99 others); Mon, 15 May 2023 21:45:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbjEPBpx (ORCPT ); Mon, 15 May 2023 21:45:53 -0400 Received: from cavan.codon.org.uk (cavan.codon.org.uk [176.126.240.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38F8846B4; Mon, 15 May 2023 18:45:50 -0700 (PDT) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 7F4FC42529; Tue, 16 May 2023 02:45:49 +0100 (BST) Date: Tue, 16 May 2023 02:45:49 +0100 From: Matthew Garrett To: "Daniel P. Smith" Cc: Ross Philipson , linux-kernel@vger.kernel.org, x86@kernel.org, linux-integrity@vger.kernel.org, linux-doc@vger.kernel.org, linux-crypto@vger.kernel.org, iommu@lists.linux-foundation.org, kexec@lists.infradead.org, linux-efi@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, ardb@kernel.org, James.Bottomley@hansenpartnership.com, luto@amacapital.net, nivedita@alum.mit.edu, kanth.ghatraju@oracle.com, trenchboot-devel@googlegroups.com Subject: Re: [PATCH v6 07/14] x86: Secure Launch kernel early boot stub Message-ID: <20230516014549.GB5403@srcf.ucam.org> References: <20230504145023.835096-1-ross.philipson@oracle.com> <20230504145023.835096-8-ross.philipson@oracle.com> <20230512112623.GE14461@srcf.ucam.org> <98decbe9-846a-6d36-aa7a-f906a19fa6cf@oracle.com> <7ff17d2b-7030-fbbd-c495-b43583e3f9e7@apertussolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7ff17d2b-7030-fbbd-c495-b43583e3f9e7@apertussolutions.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, May 15, 2023 at 09:11:15PM -0400, Daniel P. Smith wrote: > On 5/12/23 12:17, Ross Philipson wrote: > > This is a good point. At this point it is really something we > > overlooked. We will have to revisit this and figure out the best way to > > find the final event log depending on how things booted. > > I believe Ross misunderstood what you were asking for here. There are two > reasons this is not possible or desired. The first reason is that on Intel, > the DRTM log is not initialized by TrenchBoot code in the preamble. It is > only responsible for allocating a buffer and recording the location in the > TXT structures. When the SINIT ACM is executed, it will initialize the log > and record the measurement that CPU sent directly to the TPM and then the > measurements the ACM makes of the environment. If you pointed at the SRTM > log, then the ACM would write over existing log, which I don't think you > want. Now if you pointed at the tail end of the SRTM log, you would still > end up with a second, separate log that just happens to be memory adjacent. Ok. I think it would be clearer if either the function names or some comments expressly indicated that this refers to the DRTM event log and that that's a separate entity from the SRTM one, "event log" on its own is likely to cause people to think of the existing log rather than associate it with something else.