From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Date: Wed, 25 Oct 2017 15:22:25 +0000 Subject: Re: [PATCH v2] tpm: use struct tpm_chip for tpm_chip_find_get() Message-Id: <20171025152225.GC15557@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit List-Id: References: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> In-Reply-To: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> To: Jarkko Sakkinen Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Matt Mackall , Herbert Xu , Peter Huewe , Marcel Selhorst , Mimi Zohar , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" , David Safford , David Howells , Jerry Snitselaar , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , open list , "moderated list:TPM DEVICE DRIVER" , open list:INTEGRITY MEASUREMENT ARCHITECTURE (IMA) On Wed, Oct 25, 2017 at 01:55:04PM +0200, Jarkko Sakkinen wrote: > Device number (the character device index) is not a stable identifier > for a TPM chip. That is the reason why every call site passes > TPM_ANY_NUM to tpm_chip_find_get(). > > This commit changes the API in a way that instead a struct tpm_chip > instance is given and NULL means the default chip. In addition, this > commit refines the documentation to be up to date with the > implementation. > > Suggested-by: Jason Gunthorpe (@chip_num -> @chip) > Signed-off-by: Jarkko Sakkinen > v2: > * Further defined function documentation. > * Changed @chip_num to @chip instead of removing the parameter as suggested by > Jason Gunthorpe. Reviewed-by: Jason Gunthorpe Jason From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH v2] tpm: use struct tpm_chip for tpm_chip_find_get() Date: Wed, 25 Oct 2017 09:22:25 -0600 Message-ID: <20171025152225.GC15557@obsidianresearch.com> References: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Matt Mackall , Herbert Xu , Peter Huewe , Marcel Selhorst , Mimi Zohar , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" , David Safford , David Howells , Jerry Snitselaar , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , open list , "moderated list:TPM DEVICE DRIVER" , "open list:INTEGRITY MEASUREMENT ARCHITECTURE (IMA)" To: Jarkko Sakkinen Return-path: Received: from quartz.orcorp.ca ([184.70.90.242]:49480 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbdJYPWj (ORCPT ); Wed, 25 Oct 2017 11:22:39 -0400 Content-Disposition: inline In-Reply-To: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> Sender: linux-crypto-owner@vger.kernel.org List-ID: On Wed, Oct 25, 2017 at 01:55:04PM +0200, Jarkko Sakkinen wrote: > Device number (the character device index) is not a stable identifier > for a TPM chip. That is the reason why every call site passes > TPM_ANY_NUM to tpm_chip_find_get(). > > This commit changes the API in a way that instead a struct tpm_chip > instance is given and NULL means the default chip. In addition, this > commit refines the documentation to be up to date with the > implementation. > > Suggested-by: Jason Gunthorpe (@chip_num -> @chip) > Signed-off-by: Jarkko Sakkinen > v2: > * Further defined function documentation. > * Changed @chip_num to @chip instead of removing the parameter as suggested by > Jason Gunthorpe. Reviewed-by: Jason Gunthorpe Jason From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from quartz.orcorp.ca ([184.70.90.242]:49480 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbdJYPWj (ORCPT ); Wed, 25 Oct 2017 11:22:39 -0400 Date: Wed, 25 Oct 2017 09:22:25 -0600 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Matt Mackall , Herbert Xu , Peter Huewe , Marcel Selhorst , Mimi Zohar , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" , David Safford , David Howells , Jerry Snitselaar , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , open list , "moderated list:TPM DEVICE DRIVER" , "open list:INTEGRITY MEASUREMENT ARCHITECTURE (IMA)" , "open list:INTEGRITY MEASUREMENT ARCHITECTURE (IMA)" , "open list:KEYS-TRUSTED" Subject: Re: [PATCH v2] tpm: use struct tpm_chip for tpm_chip_find_get() Message-ID: <20171025152225.GC15557@obsidianresearch.com> References: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> Sender: linux-integrity-owner@vger.kernel.org List-ID: On Wed, Oct 25, 2017 at 01:55:04PM +0200, Jarkko Sakkinen wrote: > Device number (the character device index) is not a stable identifier > for a TPM chip. That is the reason why every call site passes > TPM_ANY_NUM to tpm_chip_find_get(). > > This commit changes the API in a way that instead a struct tpm_chip > instance is given and NULL means the default chip. In addition, this > commit refines the documentation to be up to date with the > implementation. > > Suggested-by: Jason Gunthorpe (@chip_num -> @chip) > Signed-off-by: Jarkko Sakkinen > v2: > * Further defined function documentation. > * Changed @chip_num to @chip instead of removing the parameter as suggested by > Jason Gunthorpe. Reviewed-by: Jason Gunthorpe Jason From mboxrd@z Thu Jan 1 00:00:00 1970 From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe) Date: Wed, 25 Oct 2017 09:22:25 -0600 Subject: [PATCH v2] tpm: use struct tpm_chip for tpm_chip_find_get() In-Reply-To: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> References: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> Message-ID: <20171025152225.GC15557@obsidianresearch.com> To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org On Wed, Oct 25, 2017 at 01:55:04PM +0200, Jarkko Sakkinen wrote: > Device number (the character device index) is not a stable identifier > for a TPM chip. That is the reason why every call site passes > TPM_ANY_NUM to tpm_chip_find_get(). > > This commit changes the API in a way that instead a struct tpm_chip > instance is given and NULL means the default chip. In addition, this > commit refines the documentation to be up to date with the > implementation. > > Suggested-by: Jason Gunthorpe (@chip_num -> @chip) > Signed-off-by: Jarkko Sakkinen > v2: > * Further defined function documentation. > * Changed @chip_num to @chip instead of removing the parameter as suggested by > Jason Gunthorpe. Reviewed-by: Jason Gunthorpe Jason -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html