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


Groups > linux.kernel > #1578596

Re: [PATCH 6/6] tpm2: add session handle context saving and restoring to the space code

From James Bottomley <James.Bottomley@HansenPartnership.com>
Newsgroups linux.kernel
Subject Re: [PATCH 6/6] tpm2: add session handle context saving and restoring to the space code
Date 2017-02-10 17:30 +0100
Message-ID <t9mf7-5Nv-9@gated-at.bofh.it> (permalink)
References <t8ys1-84Y-7@gated-at.bofh.it> <t8ys2-84Y-33@gated-at.bofh.it> <t9fGF-1x8-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 2017-02-10 at 10:52 +0200, Jarkko Sakkinen wrote:
> On Wed, Feb 08, 2017 at 01:07:08PM +0200, Jarkko Sakkinen wrote:
> > +		rc = tpm2_load_context(chip, space->session_buf,
> > +				       &offset, &handle);
> > +		if (rc == -ENOENT) {
> > +			/* load failed, just forget session */
> > +			space->session_tbl[i] = 0;
> 
> This is my only concern in this commit. Should we also in this case 
> just flush the space or not?

I elected not to.  If the handle is flushed by an external resource
manager, we get this event.  If the RM and the app agreed to release
the session handle, then flushing the space would be overkill because
it would destroy the client session, so simply removing the handle
works.  If the client tries to use the session again, it gets an error
and if it doesn't everything just works, which seems to be optimal.

James

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


Thread

[PATCH 6/6] tpm2: add session handle context saving and restoring to the space code Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-08 12:20 +0100
  Re: [PATCH 6/6] tpm2: add session handle context saving and  restoring to the space code Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-10 10:30 +0100
    Re: [PATCH 6/6] tpm2: add session handle context saving and  restoring to the space code James Bottomley <James.Bottomley@HansenPartnership.com> - 2017-02-10 17:30 +0100
      Re: [PATCH 6/6] tpm2: add session handle context saving and  restoring to the space code' Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-10 20:10 +0100
  Re: [PATCH 6/6] tpm2: add session handle context saving and  restoring to the space code Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-10 13:40 +0100
    Re: [PATCH 6/6] tpm2: add session handle context saving and  restoring to the space code James Bottomley <James.Bottomley@HansenPartnership.com> - 2017-02-10 17:30 +0100
      Re: [PATCH 6/6] tpm2: add session handle context saving and  restoring to the space code Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-10 20:20 +0100
        Re: [tpmdd-devel] [PATCH 6/6] tpm2: add session handle context  saving and restoring to the space code James Bottomley <James.Bottomley@HansenPartnership.com> - 2017-02-10 20:20 +0100
          Re: [tpmdd-devel] [PATCH 6/6] tpm2: add session handle context  saving and restoring to the space code Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-02-10 23:50 +0100

csiph-web