Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756155AbdIRQ22 (ORCPT ); Mon, 18 Sep 2017 12:28:28 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:47293 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755981AbdIRQ20 (ORCPT ); Mon, 18 Sep 2017 12:28:26 -0400 Date: Mon, 18 Sep 2017 10:28:14 -0600 From: Jason Gunthorpe To: Thiebaud Weksteen Cc: Ashley Lai , Nayna Jain , linux-efi@vger.kernel.org, Ard Biesheuvel , Matt Fleming , linux-kernel@vger.kernel.org, Matthew Garrett , tpmdd-devel@lists.sourceforge.net, peterhuewe@gmx.de, Jarkko Sakkinen , tpmdd@selhorst.net Subject: Re: [PATCH v2 3/3] tpm: parse TPM event logs based on EFI table Message-ID: <20170918162814.GA32721@obsidianresearch.com> References: <20170911100022.7251-1-tweek@google.com> <20170911100022.7251-4-tweek@google.com> <20170911164750.GA2607@obsidianresearch.com> <20170912084851.z3ednbeojawnyxk2@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1227 Lines: 30 On Mon, Sep 18, 2017 at 02:38:03PM +0200, Thiebaud Weksteen wrote: > On Tue, Sep 12, 2017 at 10:48 AM, Thiebaud Weksteen wrote: > > On Mon, Sep 11, 2017 at 10:47:50AM -0600, Jason Gunthorpe wrote: > >> On Mon, Sep 11, 2017 at 12:00:22PM +0200, Thiebaud Weksteen wrote: > >> > >> > chip->bin_log_seqops.chip = chip; > >> > - if (chip->flags & TPM_CHIP_FLAG_TPM2) > >> > + > >> > + if (log_version == EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 || > >> > + (!log_version && (chip->flags & TPM_CHIP_FLAG_TPM2))) > >> > chip->bin_log_seqops.seqops = > >> > &tpm2_binary_b_measurements_seqops; > >> > >> Lets have all the read_log_* versions return the postitive log_version > >> and get rid of the chip->flags check here. > >> > >> ie Doesn't ACPI always return the TPM 1 version? > > > > That is my understanding. Ashley, Nayna, could you confirm the format > > version expected by tpm_of? Could it be both? > > > > I've changed the returned code for ACPI but not for DeviceTree. > Without confirmation for tpm_of, I am reluctant to modify the current > behaviour. Move the TPM_CHIP_FLAG_TPM2 check into tpm_of to keep the current behavior but still return the code.. Jason