archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/>
To: Jarkko Sakkinen
Cc: Herbert Xu
	PrasannaKumar Muralidharan
	open list <>,
	David Howells <>,,
	"moderated list:TPM DEVICE DRIVER"
	Dmitry Kasatkin
	James Morris
	Matt Mackall <>,
	David Safford <safford-r/>,,
	Mimi Zohar
	"open list:KEYS-TRUSTED"
	"Serge E. Hallyn" <>
Subject: Re: [PATCH v2] tpm: use struct tpm_chip for tpm_chip_find_get()
Date: Wed, 25 Oct 2017 14:17:44 -0600	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20171025200746.svsraubdotjyzt2i-VuQAYsv1563Yd54FQh9/>

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.


Check out the vibrant tech community on one of the world's most
engaging tech sites,!

  parent reply	other threads:[~2017-10-25 20:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 11:55 [PATCH v2] tpm: use struct tpm_chip for tpm_chip_find_get() Jarkko Sakkinen
2017-10-25 15:10 ` PrasannaKumar Muralidharan
2017-10-25 19:34   ` Jarkko Sakkinen
2017-10-25 19:46     ` Jason Gunthorpe
2017-10-25 20:07       ` Jarkko Sakkinen
     [not found]         ` <20171025200746.svsraubdotjyzt2i-VuQAYsv1563Yd54FQh9/>
2017-10-25 20:17           ` Jason Gunthorpe [this message]
2017-10-26 10:54             ` Jarkko Sakkinen
2017-10-25 15:22 ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/ \ \ \ \ \
    --cc=jarkko.sakkinen-VuQAYsv1563Yd54FQh9/ \ \ \ \ \ \ \ \ \ \
    --cc=safford-r/ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).