public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jonathan M. McCune" <jonmccune@cmu.edu>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Rajiv Andrade <srajiv@linux.vnet.ibm.com>,
	Greg KH <greg@kroah.com>,
	linux-kernel@vger.kernel.org, jbeulich@novell.com,
	jmorris@namei.org, tpmdd-devel@lists.sourceforge.net,
	m.selhorst@sirrix.com, Andrew Morton <akpm@linux-foundation.org>,
	Roland Dreier <rdreier@cisco.com>,
	Reiner Sailer <sailer@us.ibm.com>
Subject: Re: [tpmdd-devel] [PATCH] TPM: Fixup pubek sysfs file
Date: Mon, 14 Sep 2009 15:23:09 -0400	[thread overview]
Message-ID: <4AAE981D.2020809@cmu.edu> (raw)
In-Reply-To: <20090914184336.GC25981@obsidianresearch.com>

Inline...

Jason Gunthorpe wrote:
> On Mon, Sep 14, 2009 at 03:34:39PM -0300, Rajiv Andrade wrote:
> 
>>> Thus, fixing the one-item-per-file issues seems reasonable to me. For 
>>> example, changing /sys/devices/platform/tpm_tis/pcrs from a single
>>> multi-entry file to a directory containing files named 0-15 or 0-23 that
>>> each then contain only the relevant 20-byte value seems quite
>>> reasonable. (Today's TPMs contain either 16 or 24 PCRs but future ones
>>> could contain many more.)
> 
>> The number of PCRs of a particular TPM can be retrieved sending it the
>> TPM_GetCapability command, so it's feasible to build this directory
>> structure dynamically (chip independent).
> 
> I think as we've seen, keeping the sysfs stuff working has a real
> cost. So that should be balanced with an actual need. Further, talking
> to the TPM and handling all the parsing properly is a huge complex
> pain, it would be better to have this code gone completely.

The "talking to the TPM" code is indeed somewhat complex, but see my 
comments below regarding IMA (*).

> Can anyone think of a reason why the PCRs should be accessed from
> sysfs? I can't. They are only really useful in connection with other
> complex TPM operations. Userspace can fully access them using the
> relevant TPM calls.

Fair enough, though they are useful in combination with IMA and as a 
sanity check that the driver is working correctly.

> The pubek should definately go, it is useless in 99% of cases.

Seconded.

> The caps file should be split up into 'manufacturer' 'tcg_version'
> (please include the spec rev too!!) and maybe 'firmware_version'. This
> would at least be useful to udev.

Seems reasonable.

* IBM's "Integrity Measurement Architecture (IMA)" is part of the Linux 
kernel as of v2.6.30 (linux-ima.sourceforge.net).  See 
security/integrity/ima/*.  This mechanism can make use of the TPM.  I've 
copied Reiner Sailer, one of the developers of IMA.

IMA can leverage the ability to read and extend PCRs, and its security 
properties derive from that functionality being a part of the kernel. 
PCR reading is currently part of the TPM driver in drivers/char/tpm/tpm.c.

Thus, to the question, "Can we remove the ability of the kernel to send 
TPM commands such as GetCapability and PCRRead?" I believe the answer is 
no. Or at least, not without causing a lot of work for the IMA system. 
Although it may be worth discussing whether this functionality should be 
moved from the driver into IMA.

To the question, "Can we remove the sysfs entries relating to PCRs and 
pubek," I believe the answer is yes, if the resulting complexity 
reduction actually turns out to be significant.

Regards,
-Jon

  reply	other threads:[~2009-09-14 19:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04  4:52 [PATCH] TPM: Fixup pubek sysfs file Jason Gunthorpe
2009-09-04  5:02 ` Roland Dreier
2009-09-04 21:03   ` Andrew Morton
2009-09-04 21:23     ` Jason Gunthorpe
2009-09-11 16:28       ` Greg KH
     [not found]       ` <17754_1252731784_n8C533ou010944_20090911162837.GC17677@kroah.com>
2009-09-14 18:01         ` [tpmdd-devel] " Jonathan M. McCune
2009-09-14 18:34           ` Rajiv Andrade
2009-09-14 18:43             ` Jason Gunthorpe
2009-09-14 19:23               ` Jonathan M. McCune [this message]
2009-09-14 19:46                 ` Jason Gunthorpe
2009-09-14 19:50                   ` Greg KH
2009-09-15  3:06                   ` Mimi Zohar
2009-09-15 18:52                     ` Jonathan M. McCune
2009-09-15 16:34           ` Hal Finney
2009-09-11 16:28     ` Greg KH
2009-09-14 20:48 ` Rajiv Andrade

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=4AAE981D.2020809@cmu.edu \
    --to=jonmccune@cmu.edu \
    --cc=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --cc=jbeulich@novell.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.selhorst@sirrix.com \
    --cc=rdreier@cisco.com \
    --cc=sailer@us.ibm.com \
    --cc=srajiv@linux.vnet.ibm.com \
    --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