Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751648AbdINSs6 (ORCPT ); Thu, 14 Sep 2017 14:48:58 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:51535 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751497AbdINSs4 (ORCPT ); Thu, 14 Sep 2017 14:48:56 -0400 X-Google-Smtp-Source: AOwi7QCa64wxrQD5WaAdAnCtJtgI4TGiSTMST++5KBkfN8o3lsMpXTV7hq2O1I3aLCN5bL5+qVdHGXigGBzRcmj/7jI= MIME-Version: 1.0 In-Reply-To: <20170914184126.eevnstwq3i6fiq4j@linux.intel.com> References: <20170911100022.7251-1-tweek@google.com> <20170911100022.7251-3-tweek@google.com> <20170914184126.eevnstwq3i6fiq4j@linux.intel.com> From: Matthew Garrett Date: Thu, 14 Sep 2017 11:48:54 -0700 Message-ID: Subject: Re: [PATCH v2 2/3] efi: call get_event_log before ExitBootServices To: Jarkko Sakkinen Cc: Thiebaud Weksteen , linux-efi@vger.kernel.org, Ard Biesheuvel , Matt Fleming , linux-kernel@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, peterhuewe@gmx.de, jgunthorpe@obsidianresearch.com, tpmdd@selhorst.net Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v8EIn4PY026781 Content-Length: 1141 Lines: 25 On Thu, Sep 14, 2017 at 11:43 AM, Jarkko Sakkinen wrote: > On Mon, Sep 11, 2017 at 12:00:21PM +0200, Thiebaud Weksteen wrote: >> With TPM 2.0 specification, the event logs may only be accessible by >> calling an EFI Boot Service. Modify the EFI stub to copy the log area to >> a new Linux-specific EFI configuration table so it remains accessible >> once booted. >> >> When calling this service, it is possible to specify the expected format >> of the logs: TPM 1.2 (SHA1) or TPM 2.0 ("Crypto Agile"). For now, only the >> first format is retrieved. >> >> Signed-off-by: Thiebaud Weksteen > > With a quick skim the code change looks good but I remember from > Matthew's talk that there was this issue that ExitBootServices() would > cause a yet another event? > > I guess you could manually synthetize that event by reading the PCR > values right after ExitBootServices()? I think that would involve breaking SHA1… the information should be available in the TCG_TREE_FINAL_EVENTS configuration table, so it /should/ just be a matter of merging the events from that into the event log.