Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1447354

Re: [PATCH] tpm: fix a race condition tpm2_unseal_trusted()

From Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Newsgroups linux.kernel
Subject Re: [PATCH] tpm: fix a race condition tpm2_unseal_trusted()
Date 2016-07-20 18:50 +0200
Message-ID <rX2R3-3Qq-5@gated-at.bofh.it> (permalink)
References <rWNoZ-2vg-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jul 20, 2016 at 03:16:32AM +0300, Jarkko Sakkinen wrote:
> Unseal and load operations should be done as an atomic unit. This
> commit fixes the issue by moving TPM mutex handling to tpm_try_get_ops()
> and tpm_put_ops(), which is probably more logical place for it anyway.

No..

'get_ops' is to be used to hold a persisent kref to a single tpm. It
cannot block other tpm access.

Eg a upper protocol might get_ops to for a long period to ensure it
consistently talks to the same TPM in a multi-tpm system.

We need something else to solve whatever you are concerned with
here..

Jason

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] tpm: fix a race condition tpm2_unseal_trusted() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-07-20 02:20 +0200
  Re: [PATCH] tpm: fix a race condition tpm2_unseal_trusted() Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-07-20 18:50 +0200
    Re: [PATCH] tpm: fix a race condition tpm2_unseal_trusted() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-07-20 23:00 +0200
      Re: [PATCH] tpm: fix a race condition tpm2_unseal_trusted() Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-07-20 23:20 +0200
        Re: [PATCH] tpm: fix a race condition tpm2_unseal_trusted() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-07-21 11:10 +0200
          Re: [PATCH] tpm: fix a race condition tpm2_unseal_trusted() Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-07-21 18:30 +0200

csiph-web