Re: [PATCH v2] tpm: use struct tpm_chip for tpm_chip_find_get()
From: Jason Gunthorpe <hidden>
Date: 2017-10-25 20:18:04
Also in:
keyrings, linux-integrity, linux-security-module, lkml
From: Jason Gunthorpe <hidden>
Date: 2017-10-25 20:18:04
Also in:
keyrings, linux-integrity, linux-security-module, lkml
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