Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2735166ybt; Tue, 16 Jun 2020 13:46:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDWFb7vre2PbHEG9zXmfk1wjkSIDiVrnk2SWY9KtO+HSxsH614aWzIjBc7ekSZNO/1LICz X-Received: by 2002:a05:6402:1247:: with SMTP id l7mr4068337edw.61.1592340402892; Tue, 16 Jun 2020 13:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592340402; cv=none; d=google.com; s=arc-20160816; b=m1r6pC5vWdo7Vi4mGkVNbhsBHqbIwH+r4QTPuAur0nnjwuyi2/z3KDcsykaBE3Ih0s IvDDn/ylgt1yk0+kkjnKRd8YHJX64+OqY6fDCuTHVreomZrRZDFJ3q3E122iV6c1hn7m 3mQxa4b2xEqo94dWd8aEdt9j5dEyiGvgilqYygDfWKO6ECsxgB6KdyYPhDzLfUcmUH6q 7OeSFxlw2Pqdhx3FecqniWhB8ykwaokgYG+hs/GiFLyKu9tB41yMnpYzjGmqP33rZjTb nmKsBr+uxOsjr3yJGwl3feuWJvotIwgbD6uHdIOrxjfWgChbtcmiexrFAvdlBSY6gq53 jCrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=AwAOSfig19PSsg45E4Z//tZyySsMTYBRMmnewGrDnA4=; b=mZsbNFS94kgniCO79ymIeLjTfegHc1A5J57w86HGl+clUv3UZm9bhMDhSPm2Vn2/Pn NxqAWKVAqs3aIs+RatARiOxpSfCHqtSROv3qhqfBL2pxNaRVkSyPiVnJhdP1B26GsTCg iViIHb0RF3ErFvn+9ZCqDv8NOH5rd7SBAT6qyWvKfDLPPUiZ4HryPSdCVKcHy66uSQVw pIBDEUsyABp/P4LmAXkOaT821NowMW30Lfmy5mslDEalIPqgLGCBbafo7fO5PTF8fPp+ jWf7usKtm7TS5Y/JWBsl5azCCkTnpnDOIExpVNoOC2y7bSWAAK5aRAw/Z972GQIUM/2f BR/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id v7si11378101edr.33.2020.06.16.13.46.19; Tue, 16 Jun 2020 13:46:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729103AbgFPUoO (ORCPT + 99 others); Tue, 16 Jun 2020 16:44:14 -0400 Received: from mga05.intel.com ([192.55.52.43]:59617 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726428AbgFPUoN (ORCPT ); Tue, 16 Jun 2020 16:44:13 -0400 IronPort-SDR: 3ltUWAbFILq0lCtfpn/Pw1pZ4tU2KAlK0zNb+GYW3yfG4elZosE4Kcdj6aGi/zj0/J2/L1DTdy K9j7bvaIbKVg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2020 13:44:11 -0700 IronPort-SDR: E6Lv6G59nFNKgevc10B6SxnZJ4f+oC+vzED5SdvjIWlocVgk0GkxSajpzfmK+gVyMHBV6Cx5am bCIYzMXI7f4Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,519,1583222400"; d="scan'208";a="273279833" Received: from gosinald-mobl2.ger.corp.intel.com (HELO localhost) ([10.249.36.106]) by orsmga003.jf.intel.com with ESMTP; 16 Jun 2020 13:44:07 -0700 Date: Tue, 16 Jun 2020 23:44:05 +0300 From: Jarkko Sakkinen To: Doug Anderson Cc: Peter Huewe , Andrey Pronin , Stephen Boyd , Arnd Bergmann , Greg Kroah-Hartman , Jason Gunthorpe , linux-integrity@vger.kernel.org, LKML Subject: Re: [PATCH] tpm_tis_spi: Don't send anything during flow control Message-ID: <20200616204405.GA20943@linux.intel.com> References: <20200528151912.1.Id689a39ce8d1ec6f29f4287277ad977ff4f57d7d@changeid> <20200601014646.GA794847@linux.intel.com> <20200604094012.GA8989@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 04, 2020 at 06:48:58AM -0700, Doug Anderson wrote: > Hi, > > On Thu, Jun 4, 2020 at 2:40 AM Jarkko Sakkinen > wrote: > > > > On Mon, Jun 01, 2020 at 03:54:03PM -0700, Doug Anderson wrote: > > > Does that answer your question, or were you worried about us needing > > > to init iobuf[0] to 0 in some other case? > > > > > > -Doug > > > > No, but it should be treated as a bug fix for CR50 implementation i.e. > > for 797c0113c9a481d4554988d70b5b52fae657262f, or is there some reason > > why it shouldn't? > > As talked about in the commit message, I think this is a slight > cleanup for non-Cr50 too. Specifically if we end up running through > the TPM_RETRY loop a second time we weren't re-initting "phy->iobuf[0] > = 0;" That means that the 2nd time through the loop we were actually > sending the TPM back the byte that the TPM sent us the first time > through the loop. > > Presumably this doesn't matter much, but it still feels nicer not to > be sending the TPM's bytes back to it when we're not really supposed > to. > > Also, as mentioned in the commit message, I haven't observed this > fixing any problems. I only came up with it from code inspection > while trying to track something else down. Thanks, I'm happy how it is. Reviewed-by: Jarkko Sakkinen /Jarkko