Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3242984ybi; Fri, 5 Jul 2019 04:17:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqydDtX1/AGJ2JYqFhUuLtQnjVe/k4CI6GT7dAfU2cffbYHOahi8Q43VJGQgKIzRiePTEgp8 X-Received: by 2002:a17:90a:1a0d:: with SMTP id 13mr4675449pjk.99.1562325445915; Fri, 05 Jul 2019 04:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562325445; cv=none; d=google.com; s=arc-20160816; b=JIQQ9qtUikrs59TEoinsTCxgm7NujghFvYOuzLMqrs5PwuNI8NzNa09+juYkuFvgHA siGppmMDHphRhFL04UWxkSvcIPjj95Sr3tRp41Jickjzh/1w8W9VYWoukXxLUQOATazz +fthQxKY0EmZxH/Gf2CvNK/JHUyzDwRZI3kGXG97LbnBl/5VLkuRlbCEndMBWpKFSskM IsL3nmrbQIsbCBxGERNetEeb3Ok1fb6xJY65/JTJal06dcOkT/YkeQHaqX+QGGxUb095 2zSgfaJqqz381dIGAaZjenifaonyB0GWpGPfbgZopPUeD3wbkaB9Q9Ple6xaAGfmcDjl hCwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=Vz8d1l9rlu6GKf1K5ujgXtBh35a+DtKn+FIQ94tTQXU=; b=bFuVs3rO9+Yrcqpc1T/yLaV6JRZSHAANl7XcvCof4Z7Uye2bxHHWoSFiU3kZ0lJrIt uoDOHmrAnIwIhSbeVVgTsz1NbQKMXMq9m83JhndsD3eBr1SF2FmSAAGN6QYJ8sxzQohP VeX8i5kgRvlHjbwY5vMYgTkFiqeL+KKhIqBwxjoV5yBOyYJPdbV0icehDj4EpD0Hdl0u papQdjldTZ+fA3pMHvdw4/IIp4UT3JAupjQrJ7lDuAd/XF9wy/GsCDtQpMAdwGvzA4EK Q8jWs11Pmme7HpRgXkj8V8tD4pCOWqZfk52MjPN7Z05gtriBYwsoZ1RNqo/cqW31ue0I b7Bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21si8867395pfo.138.2019.07.05.04.17.09; Fri, 05 Jul 2019 04:17:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727714AbfGEK0K (ORCPT + 99 others); Fri, 5 Jul 2019 06:26:10 -0400 Received: from mga02.intel.com ([134.134.136.20]:54147 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbfGEK0K (ORCPT ); Fri, 5 Jul 2019 06:26:10 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jul 2019 03:26:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,454,1557212400"; d="scan'208";a="363564024" Received: from jsakkine-mobl1.tm.intel.com ([10.237.50.189]) by fmsmga006.fm.intel.com with ESMTP; 05 Jul 2019 03:26:07 -0700 Message-ID: Subject: Re: [PATCH] tpm: Document UEFI event log quirks From: Jarkko Sakkinen To: Jordan Hand , linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, linux-doc@vger.kernel.org Cc: tweek@google.com, matthewgarrett@google.com, Jonathan Corbet Date: Fri, 05 Jul 2019 13:26:06 +0300 In-Reply-To: References: <20190703161109.22935-1-jarkko.sakkinen@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-07-03 at 10:08 -0700, Jordan Hand wrote: > > +This introduces another problem: nothing guarantees that it is not > > +called before the stub gets to run. Thus, it needs to copy the final > > +events table preboot size to the custom configuration table so that > > +kernel offset it later on. > > This doesn't really explain what the size will be used for. Matthew's > patch description for "tpm: Don't duplicate events from the final event > log in the TCG2 log" outlines this well. You could maybe word it > differently but I think the information is necessary: > > "We can avoid this problem by looking at the size of the Final Event Log > just before we call ExitBootServices() and exporting this to the main > kernel. The kernel can then skip over all events that occured before > ExitBootServices() and only append events that were not also logged to > the main log." Not exactly sure what is missing from my paragraph. The way I see it has more information as it states what is used at as the vessel for exportation (the custom configuration table). Maybe something like: "Thus, it nees to save the final events table size at the time to the custom configuration table so that the TPM driver can later on skip the events generated during the preboot time." /Jarkko