From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Date: Wed, 25 Oct 2017 20:17:44 +0000 Subject: Re: [PATCH v2] tpm: use struct tpm_chip for tpm_chip_find_get() Message-Id: <20171025201744.GB2815@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> <20171025193452.d4qa4dhacfgqejk7@linux.intel.com> <20171025194633.GB998@obsidianresearch.com> <20171025200746.svsraubdotjyzt2i@linux.intel.com> In-Reply-To: <20171025200746.svsraubdotjyzt2i-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> To: Jarkko Sakkinen Cc: Herbert Xu , "open list:INTEGRITY MEASUREMENT ARCHITECTURE (IMA)" , PrasannaKumar Muralidharan , open list , David Howells , linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "moderated list:TPM DEVICE DRIVER" , Dmitry Kasatkin , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , James Morris , Matt Mackall , "open list:INTEGRITY MEASUREMENT ARCHITECTURE (IMA)" , David Safford , linux-integrity-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mimi Zohar , "open list:KEYS-TRUSTED" , "Serge E. Hallyn" On Wed, Oct 25, 2017 at 10:07:46PM +0200, Jarkko Sakkinen wrote: > The id has a nice feature that it is unique for one boot cycle you can > even try to get a chip that has been deleted. It has the most stable > properties in the long run. It isn't unique, we can re-use ids them via idr_alloc(). We should never use index inside the kernel. > Address is a reusable identifier in one boot cycle. It is invalid to pass in a chip for which the caller does not hold a kref, so address is the safest argument. 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 14:17:44 -0600 Message-ID: <20171025201744.GB2815@obsidianresearch.com> References: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> <20171025193452.d4qa4dhacfgqejk7@linux.intel.com> <20171025194633.GB998@obsidianresearch.com> <20171025200746.svsraubdotjyzt2i@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Herbert Xu , "open list:INTEGRITY MEASUREMENT ARCHITECTURE \(IMA\)" , PrasannaKumar Muralidharan , open list , David Howells , linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "moderated list:TPM DEVICE DRIVER" , Dmitry Kasatkin , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , James Morris , Matt Mackall , "open list:INTEGRITY MEASUREMENT ARCHITECTURE \(IMA\)" , David Safford , linux-integrity-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mimi Zohar , "open list:KEYS-TRUSTED" , "Serge E. Hallyn" To: Jarkko Sakkinen Return-path: Content-Disposition: inline In-Reply-To: <20171025200746.svsraubdotjyzt2i-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-crypto.vger.kernel.org On Wed, Oct 25, 2017 at 10:07:46PM +0200, Jarkko Sakkinen wrote: > The id has a nice feature that it is unique for one boot cycle you can > even try to get a chip that has been deleted. It has the most stable > properties in the long run. It isn't unique, we can re-use ids them via idr_alloc(). We should never use index inside the kernel. > Address is a reusable identifier in one boot cycle. It is invalid to pass in a chip for which the caller does not hold a kref, so address is the safest argument. Jason ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from quartz.orcorp.ca ([184.70.90.242]:42495 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932162AbdJYUR7 (ORCPT ); Wed, 25 Oct 2017 16:17:59 -0400 Date: Wed, 25 Oct 2017 14:17:44 -0600 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: PrasannaKumar Muralidharan , 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: <20171025201744.GB2815@obsidianresearch.com> References: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> <20171025193452.d4qa4dhacfgqejk7@linux.intel.com> <20171025194633.GB998@obsidianresearch.com> <20171025200746.svsraubdotjyzt2i@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20171025200746.svsraubdotjyzt2i@linux.intel.com> Sender: linux-integrity-owner@vger.kernel.org List-ID: On Wed, Oct 25, 2017 at 10:07:46PM +0200, Jarkko Sakkinen wrote: > The id has a nice feature that it is unique for one boot cycle you can > even try to get a chip that has been deleted. It has the most stable > properties in the long run. It isn't unique, we can re-use ids them via idr_alloc(). We should never use index inside the kernel. > Address is a reusable identifier in one boot cycle. It is invalid to pass in a chip for which the caller does not hold a kref, so address is the safest argument. Jason From mboxrd@z Thu Jan 1 00:00:00 1970 From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe) Date: Wed, 25 Oct 2017 14:17:44 -0600 Subject: [PATCH v2] tpm: use struct tpm_chip for tpm_chip_find_get() In-Reply-To: <20171025200746.svsraubdotjyzt2i@linux.intel.com> References: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> <20171025193452.d4qa4dhacfgqejk7@linux.intel.com> <20171025194633.GB998@obsidianresearch.com> <20171025200746.svsraubdotjyzt2i@linux.intel.com> Message-ID: <20171025201744.GB2815@obsidianresearch.com> To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org On Wed, Oct 25, 2017 at 10:07:46PM +0200, Jarkko Sakkinen wrote: > The id has a nice feature that it is unique for one boot cycle you can > even try to get a chip that has been deleted. It has the most stable > properties in the long run. It isn't unique, we can re-use ids them via idr_alloc(). We should never use index inside the kernel. > Address is a reusable identifier in one boot cycle. It is invalid to pass in a chip for which the caller does not hold a kref, so address is the safest argument. 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 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 14:17:44 -0600 Message-ID: <20171025201744.GB2815@obsidianresearch.com> References: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> <20171025193452.d4qa4dhacfgqejk7@linux.intel.com> <20171025194633.GB998@obsidianresearch.com> <20171025200746.svsraubdotjyzt2i@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20171025200746.svsraubdotjyzt2i-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Jarkko Sakkinen Cc: Herbert Xu , "open list:INTEGRITY MEASUREMENT ARCHITECTURE (IMA)" , PrasannaKumar Muralidharan , open list , David Howells , linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "moderated list:TPM DEVICE DRIVER" , Dmitry Kasatkin , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , James Morris , Matt Mackall , "open list:INTEGRITY MEASUREMENT ARCHITECTURE (IMA)" , David Safford , linux-integrity-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mimi Zohar , "open list:KEYS-TRUSTED" , "Serge E. Hallyn" List-Id: tpmdd-devel@lists.sourceforge.net On Wed, Oct 25, 2017 at 10:07:46PM +0200, Jarkko Sakkinen wrote: > The id has a nice feature that it is unique for one boot cycle you can > even try to get a chip that has been deleted. It has the most stable > properties in the long run. It isn't unique, we can re-use ids them via idr_alloc(). We should never use index inside the kernel. > Address is a reusable identifier in one boot cycle. It is invalid to pass in a chip for which the caller does not hold a kref, so address is the safest argument. Jason ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot