Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10142219rwr; Fri, 12 May 2023 04:33:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4qaC9msbXAQozv/h4AUc2KSr9tY8AiCZIHIZneKgkDqWEY4c1uHoSUwZibSyrv1r1YakmE X-Received: by 2002:a05:6a20:72a2:b0:100:c4f1:72a0 with SMTP id o34-20020a056a2072a200b00100c4f172a0mr21939771pzk.3.1683891209579; Fri, 12 May 2023 04:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683891209; cv=none; d=google.com; s=arc-20160816; b=GXRj+TUx6siGhOoR5ObbWKAJ80RyWuRhMCSBsAUFiQJPvRgem9VPRtooJxB+Pv+0oQ jdSvLjf3JoDIXuV6kKaF+G2IYB8nCWlodktieP+YT7fZ45ZKJCvcwvVAlWIr7BfrlQIw VQrhAIUb4kc+BlsbQDNXiLacf0Pa/bukBLxWC3YABjyWZgj+ueajygezoz1xzykL6ma9 2hG4cESImv7DX68Zffn/zrez8w1g02g+dYn40CDtdDJg4GMOV5cjn8ygdOUaFd3KwSg/ tUnxV2qOruPv4Qp7mAG3CpUXICpLkFndwtSlZk7VvZO5fFOoSDVTgUsAGBiehz1dPT04 Y7zQ== 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=HTPFdVySUqUwRk5Hs6TV/99Z0t5P1tIR5u58GXmorCU=; b=XKMAux9GG9Nc1C3PnJY1ivQLMX5oHgJVLZUh0U/9dL2+B8+BCohr3QZK7viKU+8o4u /0tYTiwx3lcUpOePsdewPBtu10YXdWRJo87+8PpmLL5jGicUDl9IsiwkMMFdHoYOF1ow NMBiz/GzEWr05Slohgw+ez5rZ72PM0VKKwfQpissFfNSvJacz3UdPW7UTaKe2+GFFDLL xSWtTaV3aTJR5g72Le0pUksRJQZPrHq4yr5m9GOJdXJADkVEVk5c2Z5tX4BEZyF7FHmQ PpqpCUnao1c2n+uag1dty0UtjwfbjIRTNuBQbEo2Qikx7qf/uuxRkQe1+frFN0MU0egv jhJA== 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 m2-20020a637d42000000b005306facab05si4457187pgn.120.2023.05.12.04.33.12; Fri, 12 May 2023 04:33:29 -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 S241134AbjELL02 (ORCPT + 99 others); Fri, 12 May 2023 07:26:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241139AbjELL01 (ORCPT ); Fri, 12 May 2023 07:26:27 -0400 X-Greylist: delayed 1325 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 12 May 2023 04:26:25 PDT Received: from cavan.codon.org.uk (cavan.codon.org.uk [176.126.240.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E94D18A5B; Fri, 12 May 2023 04:26:24 -0700 (PDT) Received: by cavan.codon.org.uk (Postfix, from userid 1000) id 3036142527; Fri, 12 May 2023 12:26:23 +0100 (BST) Date: Fri, 12 May 2023 12:26:23 +0100 From: Matthew Garrett To: Ross Philipson Cc: 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, dpsmith@apertussolutions.com, 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: <20230512112623.GE14461@srcf.ucam.org> References: <20230504145023.835096-1-ross.philipson@oracle.com> <20230504145023.835096-8-ross.philipson@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230504145023.835096-8-ross.philipson@oracle.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 Thu, May 04, 2023 at 02:50:16PM +0000, Ross Philipson wrote: > +static void sl_find_event_log(struct slr_table *slrt) If this is called after the EFI stub then we're presumably post-ExitBootServices and we're copied the TPM event log into a configuration table so it's available to the runtime kernel. That also means that we should be adding all further measurements to the Final Events Table rather than the initial event log. How's that handled here, both in terms of ensuring further events (generated by firmware or by us) get added to the right place, and in terms of ensuring the event logs the kernel has later on were covered appropriately? Or is the SL event log an entirely different thing that can be merged in later because it only covers the DRTM PCRs? > +static void sl_extend_setup_data(struct slr_policy_entry *entry) > +{ > + struct setup_data *data; > + > + /* > + * Measuring the boot params measured the fixed e820 memory map. > + * Measure any setup_data entries including e820 extended entries. > + */ > + data = (struct setup_data *)(unsigned long)entry->entity; > + while (data) > + data = sl_handle_setup_data(data, entry); > +} Is e820 sufficient here? There are cases where we use the EFI memory map directly (sorry), but I don't know if any of them are relevant to DRTM outcomes.