All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ken Goldman <kgoldman-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: TPM 2.0 RM flushcontext returning bad address
Date: Wed, 11 Jan 2017 15:29:06 -0500	[thread overview]
Message-ID: <o564ig$9iv$1@blaine.gmane.org> (raw)
In-Reply-To: <1484164614.2509.31.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>

On 1/11/2017 2:56 PM, James Bottomley wrote:

> I'm playing with adding session based handles to the RM now.  What I
> find is that there's no escape from interpreting TPM2_FlushContext
> because we need to know if we can release a session resource and we
> can't rely on the continuation parameter alone.  Given this problem, it
> looks like we have no choice but to intercept TPM2_FlushContext and
> emulate its execution, so we're going to have to manufacture at least
> some TPM return codes within the kernel.  Once we start down this path,
> it's probably fairly easy to add for the other RM returns.

If this helps:

FlushContext can have any handle (except permanent handles)

In addition:

Session - continue attribute false
Sequence - SequenceComplete, EventSequenceComplete

Manufacturing error codes in the kernel is one possibility. Another is 
to just map the unknown handle to TPM_RH_NULL and let the TPM do the rest.




------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi

  parent reply	other threads:[~2017-01-11 20:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 20:01 TPM 2.0 RM flushcontext Ken Goldman
2017-01-10 20:08 ` Jason Gunthorpe
     [not found]   ` <20170110200803.GB5102-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-10 22:31     ` TPM 2.0 RM flushcontext returning bad address Ken Goldman
2017-01-10 22:42       ` Jason Gunthorpe
     [not found]         ` <20170110224225.GA5451-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-01-11 11:38           ` Jarkko Sakkinen
2017-01-11 19:43           ` Ken Goldman
2017-01-11 19:56             ` James Bottomley
     [not found]               ` <1484164614.2509.31.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2017-01-11 20:29                 ` Ken Goldman [this message]
2017-01-14 16:45                 ` James Bottomley
     [not found]                   ` <1484412351.2424.7.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2017-01-14 18:19                     ` Ken Goldman
2017-01-14 18:32                       ` James Bottomley
2017-01-11 21:55             ` 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:
  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='o564ig$9iv$1@blaine.gmane.org' \
    --to=kgoldman-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.