Re: [tpmdd-devel] [PATCH 2/2] tpm2: context save and restore space managed sessions

From: James Bottomley
Date: Thu Jan 19 2017 - 07:13:25 EST


On Thu, 2017-01-19 at 14:04 +0200, Jarkko Sakkinen wrote:
> On Wed, Jan 18, 2017 at 10:10:42AM -0500, James Bottomley wrote:
> > Now that sessions are isolated, we can introduce a session_buf in
> > the tpm2 space to save and restore them. This allows us to have
> > many more sessions active simultaneously (up to
> > TPM_PT_MAX_SESSIONS). As part of this, we must intercept and
> > manually remove contexts for flushed sessions.
>
> Again I don't understand the interception part. Like with transient
> objects I just catch TPM_RC_HANDLE error and forget them in the save
> part.

it's for the global session tracking patch (see other email for
details)

> PS. Do you mind if I take part of the patch that encapsulates a
> single context save as of my patch that implements transient object
> swapping? It merely moves the code in there to a different location.
> Would just make the patch set cleaner. I would do this for v4 of the
> patch set.

Sure. Rebase should be able to do this easily for me.

James