linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
	stable@vger.kernel.org, Marcel Selhorst <tpmdd@selhorst.net>,
	"moderated list:TPM DEVICE DRIVER" 
	<tpmdd-devel@lists.sourceforge.net>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6] tpm: fix a race condition in tpm2_unseal_trusted()
Date: Tue, 30 Aug 2016 21:41:41 +0300	[thread overview]
Message-ID: <20160830184141.GA7031@intel.com> (raw)
In-Reply-To: <20160830180701.GA7586@obsidianresearch.com>

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

      reply	other threads:[~2016-08-30 18:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29 22:51 [PATCH v6] tpm: fix a race condition in tpm2_unseal_trusted() Jarkko Sakkinen
2016-08-30 10:19 ` Jarkko Sakkinen
2016-08-30 18:07 ` Jason Gunthorpe
2016-08-30 18:41   ` Jarkko Sakkinen [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20160830184141.GA7031@intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=stable@vger.kernel.org \
    --cc=tpmdd-devel@lists.sourceforge.net \
    --cc=tpmdd@selhorst.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).