From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754212AbcESJHV (ORCPT ); Thu, 19 May 2016 05:07:21 -0400 Received: from mga14.intel.com ([192.55.52.115]:34335 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753769AbcESJHR (ORCPT ); Thu, 19 May 2016 05:07:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,333,1459839600"; d="scan'208";a="106739998" Date: Thu, 19 May 2016 12:07:14 +0300 From: Jarkko Sakkinen To: Jason Gunthorpe Cc: andrew.zamansky@nuvoton.com, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH v2] tpm: Factor out common startup code Message-ID: <20160519090714.GA12092@intel.com> References: <1463423147-9874-1-git-send-email-jgunthorpe@obsidianresearch.com> <20160517041557.GA29299@intel.com> <20160517165304.GA19976@obsidianresearch.com> <20160518095924.GA7177@intel.com> <20160518171320.GA15170@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160518171320.GA15170@obsidianresearch.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 18, 2016 at 11:13:20AM -0600, Jason Gunthorpe wrote: > On Wed, May 18, 2016 at 12:59:24PM +0300, Jarkko Sakkinen wrote: > > On Tue, May 17, 2016 at 10:53:04AM -0600, Jason Gunthorpe wrote: > > > On Tue, May 17, 2016 at 07:15:57AM +0300, Jarkko Sakkinen wrote: > > > > On Mon, May 16, 2016 at 12:25:47PM -0600, Jason Gunthorpe wrote: > > > > > Provide some flags in tpm_class_ops to allow drivers to opt-in to the > > > > > common startup sequence. This is the sequence used by tpm_tis and > > > > > tpm_crb. > > > > > > > > > > All drivers should set this flag. > > > > > > > > The commit message should be a much much more verbose I cannot include > > > > this without a better explanation. Please update this for the next > > > > revision. > > > > > > What more description do you want to see? > > > > It is lacking a lot of relevant information: > > > > * It should explain what you mean by startup sequence". > > * It should describe the constant TPM_OPS_AUTO_STARTUP > > * It should explain what drivers are doing at the moment (before > > this feature). > > * It should explain what is the benefit for different HW drivers > > after applying this patch. > > * It should explain why you call the executed sequence "automatic" > > and also use the word "standard". Yeah, I didn't understand this, > > this not me being picky. Maybe it should be DEFAULT_STARTUP?? > > Well, use something like this then. You can edit descriptions to your > liking when you apply the patch, FWIW. > > tpm: Factor out common startup code > > The TCG standard startup sequence (get timeouts, tpm startup, etc) for > TPM and TPM2 chips is being open coded in many drivers, move it into > the core code. > > tpm_tis and tpm_crb are used as the basis for the core code > implementation and the easy drivers are converted. In the process > several small drivers bugs relating to error handling this flow > are fixed. > > For now the flag TPM_OPS_AUTO_STARTUP is optional to allow a staged > driver roll out, but ultimately all drivers should use this flow and > the flag removed. Some drivers still do not implement the startup > sequence at all and will need to be tested with it enabled. This is so much better! Thank you. I can always edit a description but I do not want completely rewrite them :) /Jarkko