Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3181905ybi; Fri, 5 Jul 2019 03:17:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDj4uxSRn3c/TPll6fmO5UyUOizYYvLtRFFMa5OCT9j0P/8zmn734ffNpkI+r/NFoIpuMr X-Received: by 2002:a63:56:: with SMTP id 83mr4591882pga.145.1562321833214; Fri, 05 Jul 2019 03:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562321833; cv=none; d=google.com; s=arc-20160816; b=yfeQaHgYeMK6LefkWDi9pm0DEFyt1jEIs5AcPwGhswkwwmcvduw8zV0OWwG1gCJlwz Ua3YIiACKlqIyfT/oXAwHcDDW9wjs3k/SaAoVx+dKfysd0a3mZN3du/YaEdMC/chZEE7 73zjSGmJePDQBUVV7FnsPcOB7e+3u5IZKGwzpWFUFn1vIYg4a6N1KuSB4NiJCShGS4cS YzDrMnU63yLOsaRwFfHAd2Otfj/w8xFgBeUuBaF+ZTNmP5G1uhfw3fO5DJqXY67bAAfb Xe79UtXHvBOupAeT47drMb2FmHqAzF6xPQFUw6nXZMbkDUfelefgUPE0NlRvjEBRXSUL v0kg== 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=oKRar+h9SMkEF0N79VxF0NveJ3cDn2paxHK+pJYylSI=; b=zj9f1qAsMl+E+9+WFKR5av8rWPbHnJGfvM2n7kFCgBOVEGcwLgSXqqEIZIjUidGMIF 8tVo7eRWm3twqaa1fdsjorj1ovcJQJ2lY7KdJBd8GUNwareInqgNksYYy+YT4+eYo9KW 6bmgzR3+L+mLjlp2O27Aii/WoBz7fbjYK55m1HDF6P4jGjCU2oK/I5qVO782YM0QKCX3 TPTKR2oMO5uMiB4qp217H/bmFXZNe6I8ghn//8XxvBM+NzGZljEwnpTXjIXrQA+liOWh XzIKji2vt6jYh/UiY8PrI8ltvewokN8SIVMReLQMxax6YCBdyGjbBeNERwzxFnwchd0h o3BA== 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 x185si9245722pfx.243.2019.07.05.03.16.58; Fri, 05 Jul 2019 03:17:13 -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 S1728346AbfGEKPE (ORCPT + 99 others); Fri, 5 Jul 2019 06:15:04 -0400 Received: from mga05.intel.com ([192.55.52.43]:13012 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbfGEKPE (ORCPT ); Fri, 5 Jul 2019 06:15:04 -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 fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jul 2019 03:15:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,454,1557212400"; d="scan'208";a="363561959" Received: from jsakkine-mobl1.tm.intel.com ([10.237.50.189]) by fmsmga006.fm.intel.com with ESMTP; 05 Jul 2019 03:15:01 -0700 Message-ID: Subject: Re: [PATCH] tpm: Document UEFI event log quirks From: Jarkko Sakkinen To: Randy Dunlap , 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:15:01 +0300 In-Reply-To: <6acf78df-b168-14d3-fea4-9a9d2945e77f@infradead.org> References: <20190703161109.22935-1-jarkko.sakkinen@linux.intel.com> <6acf78df-b168-14d3-fea4-9a9d2945e77f@infradead.org> 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 09:45 -0700, Randy Dunlap 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. > > ? kernel can offset it later on. EFI stub calculates the total size of the events in the final events table at the time. Later on, TPM driver uses this offset to copy only the events that were actually generated after ExitBootServices(): /* * Copy any of the final events log that didn't also end up in the * main log. Events can be logged in both if events are generated * between GetEventLog() and ExitBootServices(). */ memcpy((void *)log->bios_event_log + log_size, final_tbl->events + log_tbl->final_events_preboot_size, efi_tpm_final_log_size); What would be a better way to describe this? /Jarkko