Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5020169ybv; Wed, 26 Feb 2020 07:06:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzoUkA+IdGkDJFV8PNFMYFhW/+t7m+51v1a6ffac9U8wLImEVMbA/p8wsLRZJ6o8vvvuaKD X-Received: by 2002:aca:c646:: with SMTP id w67mr3325730oif.171.1582729570798; Wed, 26 Feb 2020 07:06:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582729570; cv=none; d=google.com; s=arc-20160816; b=tdEQRV8+pNW5GhSP2s9xxubsSmgR0O5iQYyeLpA7LwzuCwVpog/ttHYvjEBJFGfnwW hYgNcc9kjvUeK22o+ecNy49u+STrcWrlmEJJ29KMSC+sh0J0jmRQFLRPA1ydHstEUgDT 6B3KP5Ul2DybHa3lTx4qgG+NFdTmfYLTcRLlheqC/mxS24I/v7s/nE7q5eKqY5Z8Q0cY RjZc9bFwBz2ZVc41KROW4eD9BzqHg40432Gk9cHo79s2P+7QpFVu3rfpx7T5LUNq9+k+ Tbl1S2oIGN/k1PXzxfGSX2aBU5j8+eY+Thwl9jg3HVv/RKX9T/jbpZdxtsrfsmro/OaN qe5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Qqao4Ete37kMh40T7q2ib5zhaeFhRWRWMjxKOWTFaEs=; b=jZA0t4G7h8y2RaVaDSl598CzJFbtsz3e3lREzhT6oBwlLNYMuMK5X9+lQQMnXN144t Hz3ChZMo7QQQkvB8C7TOnWUIubkcaumzurMinX7fQ9NhTqaweoSE+4pljFD0QWbGYT68 MSSZAZYxO3vqj5UxQwfPtWpd7s0Vb+y7MdMifeR/CuPoySMpN82TjAq7KA89ho12wRIn nVNF3hL6PPrWWx3HifLgu1fVQKQlNoKXY7tKqSd7ucKDBa0B0kRDasz5BoT+qiYWSUli KCNhhYQ4ot60/R2n0EdvsaQSAHOGaOAWNhwU77xeIfb3Ptvjf+2aKGMmdv/Y+77am2NM d7Og== 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 j1si1480872otn.53.2020.02.26.07.05.58; Wed, 26 Feb 2020 07:06:10 -0800 (PST) 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 S1727823AbgBZPDC (ORCPT + 99 others); Wed, 26 Feb 2020 10:03:02 -0500 Received: from mga02.intel.com ([134.134.136.20]:23955 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726148AbgBZPDC (ORCPT ); Wed, 26 Feb 2020 10:03:02 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2020 07:03:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,488,1574150400"; d="scan'208";a="238058625" Received: from avgorshk-mobl.ccr.corp.intel.com (HELO localhost) ([10.252.15.208]) by orsmga003.jf.intel.com with ESMTP; 26 Feb 2020 07:02:57 -0800 Date: Wed, 26 Feb 2020 17:02:55 +0200 From: Jarkko Sakkinen To: Stefan Berger Cc: Stefan Berger , linux-integrity@vger.kernel.org, aik@ozlabs.ru, david@gibson.dropbear.id.au, linux-kernel@vger.kernel.org, nayna@linux.vnet.ibm.com, gcwilson@linux.ibm.com, jgg@ziepe.ca Subject: Re: [PATCH v2 3/4] tpm: Implement tpm2_init to call when TPM_OPS_AUTO_STARTUP is not set Message-ID: <20200226150255.GB3407@linux.intel.com> References: <20200213202329.898607-1-stefanb@linux.vnet.ibm.com> <20200213202329.898607-4-stefanb@linux.vnet.ibm.com> <20200225170015.GE15662@linux.intel.com> <3813980a-6c5e-c99f-7b37-b20b72eb6a8a@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3813980a-6c5e-c99f-7b37-b20b72eb6a8a@linux.ibm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 25, 2020 at 01:20:39PM -0500, Stefan Berger wrote: > On 2/25/20 12:00 PM, Jarkko Sakkinen wrote: > > On Thu, Feb 13, 2020 at 03:23:28PM -0500, Stefan Berger wrote: > > > From: Stefan Berger > > > > > > Implement tpm2_init() that gets the TPM 2 timeouts and command durations > > > and command code attributes. This function is to be called in case the > > > TPM_OPS_AUTO_STARTUP flag is not set and therefore tpm2_auto_startup() > > > is not called. > > > > > > Signed-off-by: Stefan Berger > > The commit makes zero effort trying to explain what the heck tpm_init() > > is and when it should be used and why the function name tpm2_init(). > > Are you saying the explanation of when to use tpm2_init above is not enough? > 'bviously we are trying to cover the case of using the TPM 2 by a driver > that doesn't use the TPM_OPS_AUTO_STARTUP flag and therefore the TPM 2 > timeouts and command durations and command code attributes are not set as > they would be if tpm2_auto_startup() was to be called and tpm2_init() is the > alternative to call. I didn't like tpm2_init() either... any suggestions for > a better name? I'm not getting what this commit is trying to do in the first place. /Jarkko