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


Groups > linux.kernel > #1472767

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

From Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v6] tpm: fix a race condition in tpm2_unseal_trusted()
Date 2016-08-30 20:50 +0200
Message-ID <sbWgG-7T-29@gated-at.bofh.it> (permalink)
References <sbDH3-4VF-1@gated-at.bofh.it> <sbVDX-8iA-3@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


On Tue, Aug 30, 2016 at 12:07:01PM -0600, Jason Gunthorpe wrote:
> On Tue, Aug 30, 2016 at 01:51:06AM +0300, Jarkko Sakkinen wrote:
> > Unseal and load operations should be done as an atomic operation. This
> > commit introduces unlocked tpm_transmit() so that tpm2_unseal_trusted()
> > can do the locking by itself.
> > 
> > v2: Introduced an unlocked unseal operation instead of changing locking
> >     strategy in order to make less intrusive bug fix and thus more
> >     backportable.
> > 
> > v3: Have also separate __tpm_transmit() that takes 'flags' in order to
> >     better localize the bug fix and make it easier to backport.
> > 
> > v4: Cleaned up the control flow in tpm2_unseal_trusted. Added the
> >     missing 'Fixes' line.
> > 
> > v5: Previous versions did not set the enum to any value, so it was set
> >     to zero. Changed enum to TPM_TRANSMIT_UNLOCKED because it is
> >     guaranteed to catch such situation. With change the common case
> >     adds so little clutter that the wrappers do not make sense anymore.
> > 
> > v6: Added flags parameter to internal TPM command wrappers to have
> >     an expected default behavior and documented them.
> 
> Yeah, this is nice.
> 
> BTW, do not put the vX: stuff into the commit message, and it would be
> best to include it after the diffstat the patch email

I was going to strip it but including it after the diffstat sounds like
a great idea.

> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> 
> Jason

/Jarkko

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


Thread

[PATCH v6] tpm: fix a race condition in tpm2_unseal_trusted() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-08-30 01:00 +0200
  Re: [PATCH v6] tpm: fix a race condition in tpm2_unseal_trusted() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-08-30 12:20 +0200
  Re: [PATCH v6] tpm: fix a race condition in tpm2_unseal_trusted() Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-08-30 20:10 +0200
    Re: [PATCH v6] tpm: fix a race condition in tpm2_unseal_trusted() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-08-30 20:50 +0200

csiph-web