public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Dr. Greg Wettstein" <greg@enjellic.com>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: "Dr. Greg Wettstein" <greg@enjellic.com>,
	Ken Goldman <kgold@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, tpmdd-devel@lists.sourceforge.net
Subject: Re: [tpmdd-devel] [RFC] tpm2-space: add handling for global session exhaustion
Date: Fri, 17 Feb 2017 03:56:26 -0600	[thread overview]
Message-ID: <20170217095626.GA26064@wind.enjellic.com> (raw)
In-Reply-To: <20170216203304.wrbpfd4mrmyh6vct@intel.com>

On Thu, Feb 16, 2017 at 10:33:04PM +0200, Jarkko Sakkinen wrote:

Good morning to everyone.

> On Thu, Feb 16, 2017 at 02:06:42PM -0600, Dr. Greg Wettstein wrote:
> > Just as an aside, has anyone given any thought about TPM2 resource
> > management in things like TXT/tboot environments?  The current tboot
> > code makes a rather naive assumption that it can take a handle slot to
> > protect its platform verification secret.  Doing resource management
> > correctly will require addressing extra-OS environments such as this
> > which may have TPM2 state requirement issues.

> The current implementation handles stuff created from regular
> /dev/tpm0 so I do not think this would be an issue. You can only
> access objects from a TPM space that are created within that space.

Unless I misunderstand the number of transient objects which can be
managed is a characteristic of the hardware and is a limited resource,
hence our discussion on the notion of a resource manager to shuttle
context in and out of these limited slots.

On a Kabylake system, running the following command:

getcapability -cap 6 | grep trans

After booting into a TXT mediated measured launch environment (MLE) yields
the following:

TPM_PT 0000010e value 00000003 TPM_PT_HR_TRANSIENT_MIN - the minimum number of transient objects that can be held in TPM RAM

TPM_PT 00000207 value 00000002 TPM_PT_HR_TRANSIENT_AVAIL - estimate of the number of additional transient objects that could be loaded into TPM RAM

Booting without TXT results in the getcapability call indicating that
three slots are available.  Based on that and reading the tboot code,
we are assuming the occupied slot is the ephemeral primary key
generated by tboot which seals the verification secret.

In an MLE it is possible to create and then flush a new ephemeral
primary key which results in the following getcapability output:

TPM_PT 00000207 value 00000003 TPM_PT_HR_TRANSIENT_AVAIL - estimate of
the number of additional transient objects that could be loaded into TPM RAM

Which is probably going to be pretty surprising to tboot in the event
that it tries to re-verify the system state after a suspend event.

So based on that it would seem there would need to be some semblance
of cooperation between the resource manager and an extra-OS
utilization of TPM2 resources such as tboot.

Thoughts?

> /Jarkko

Greg

As always,
Dr. G.W. Wettstein, Ph.D.   Enjellic Systems Development, LLC.
4206 N. 19th Ave.           Specializing in information infra-structure
Fargo, ND  58102            development.
PH: 701-281-1686
FAX: 701-281-3949           EMAIL: greg@enjellic.com
------------------------------------------------------------------------------
"For a successful technology, reality must take precedence over public
 relations, for nature cannot be fooled."
                                -- Richard Feynmann

  reply	other threads:[~2017-02-17  9:56 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10 10:03 [tpmdd-devel] [RFC] tpm2-space: add handling for global session exhaustion Dr. Greg Wettstein
2017-02-10 16:46 ` James Bottomley
2017-02-12 20:29   ` Ken Goldman
     [not found]   ` <OFA049276F.2B32440E-ON852580C3.00742287-852580C3.00748E6B@notes.na.collabserv.com>
2017-02-14 14:38     ` Dr. Greg Wettstein
2017-02-14 16:47       ` James Bottomley
     [not found]       ` <71dc0e80-6678-a124-9184-1f93c8532d09@linux.vnet.ibm.com>
2017-02-16 20:06         ` Dr. Greg Wettstein
2017-02-16 20:33           ` Jarkko Sakkinen
2017-02-17  9:56             ` Dr. Greg Wettstein [this message]
2017-02-17 12:37               ` Jarkko Sakkinen
2017-02-17 22:37                 ` Dr. Greg Wettstein
  -- strict thread matches above, loose matches on Subject: below --
2017-02-09  9:06 Dr. Greg Wettstein
2017-02-09 15:19 ` Jarkko Sakkinen
2017-02-09 19:04   ` Jason Gunthorpe
2017-02-09 19:29     ` James Bottomley
2017-02-09 21:54       ` Jason Gunthorpe
2017-02-10  8:48     ` Jarkko Sakkinen
2017-02-09 19:24 ` James Bottomley
2017-02-09 20:05 ` James Bottomley
2017-01-18 20:48 James Bottomley
2017-01-19 12:25 ` [tpmdd-devel] " Jarkko Sakkinen
2017-01-19 12:41   ` Jarkko Sakkinen
     [not found]     ` <o6gdhu$li$1@blaine.gmane.org>
2017-01-27 21:59       ` James Bottomley
2017-01-19 12:59   ` James Bottomley
2017-01-20 13:40     ` Jarkko Sakkinen
     [not found] ` <o6gese$pev$1@blaine.gmane.org>
2017-01-27 22:04   ` James Bottomley
2017-01-27 23:35     ` Jason Gunthorpe
2017-01-27 23:48       ` James Bottomley
2017-01-30  0:52     ` Ken Goldman
2017-01-30 16:04       ` [tpmdd-devel] " James Bottomley
2017-01-30 21:58         ` Jarkko Sakkinen
2017-01-30 22:13           ` James Bottomley
2017-01-31 13:31             ` Jarkko Sakkinen
     [not found]         ` <o6qog0$30l$1@blaine.gmane.org>
2017-01-31 19:55           ` James Bottomley

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=20170217095626.GA26064@wind.enjellic.com \
    --to=greg@enjellic.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=kgold@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tpmdd-devel@lists.sourceforge.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