From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: "Peter Hüwe" <PeterHuewe@gmx.de>
Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
tpmdd-devel@lists.sourceforge.net,
Marcel Selhorst <tpmdd@selhorst.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 12/12] tpm: TPM2 sysfs attributes
Date: Wed, 24 Sep 2014 14:46:27 -0600 [thread overview]
Message-ID: <20140924204627.GA12407@obsidianresearch.com> (raw)
In-Reply-To: <201409242235.42286.PeterHuewe@gmx.de>
On Wed, Sep 24, 2014 at 10:35:42PM +0200, Peter Hüwe wrote:
> Am Mittwoch, 24. September 2014, 22:19:38 schrieb Jason Gunthorpe:
> > On Wed, Sep 24, 2014 at 10:02:34PM +0300, Jarkko Sakkinen wrote:
> > > > The pcrs file never conformed to the sysfs rules, if TPM2 is getting a
> > > > whole new file set, I wouldn't mind seeing it not include the
> > > > non-conformant ones. What do you think?
> > >
> > > I think that it's better to put extra focus on these sysfs attributes in
> > > first patch set because it's user space visible. What's wrong in the
> > > current pcrs file?
> >
> > Each PCR should be a distinct sysfs file, probably with a
> > directory. One Value Per File is the rule.
>
> That would be 24*2 files only for pcrs...
Some subsystems do just that..
$ ls /sys/class/infiniband/qib0/ports/1/sl2vl/
0 1 10 11 12 13 14 15 2 3 4 5 6 7 8 9
> Documentation/filesystems/sysfs.txt says:
>
> "
> Attributes should be ASCII text files, preferably with only one value
> per file. It is noted that it may not be efficient to contain only one
> value per file, so it is socially acceptable to express an array of
> values of the same type. "
>
> So it would be more or less o.k. to have it in one file like we had.
>
> Then however:
> "Mixing types, expressing multiple lines of data, and doing fancy
> formatting of data is heavily frowned upon. Doing these things may get
> you publicly humiliated and your code rewritten without notice."
I think taken together that says an array of 128 bit PCR hex values
without new lines or other formatting would be OK. But the breakdown
and fancy formatting we do is not OK.
> Do we really need the PCRs as sysfs files? I know they are handy as
> a dev, but does any application actually use this directly?
No idea, but using tpm2 to find out seems like a reasonable idea,
especially if the pcr meaning changes in some way with TPM2 ..
Jason
next prev parent reply other threads:[~2014-09-24 20:46 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 9:05 [PATCH v1 00/12] tpm: TPM2 support Jarkko Sakkinen
2014-09-24 9:05 ` [PATCH v1 01/12] tpm: prepare TPM driver for adding " Jarkko Sakkinen
2014-09-24 16:49 ` Jason Gunthorpe
2014-09-24 9:05 ` [PATCH v1 02/12] tpm: TPM2 support for tpm_calc_ordinal_durations() Jarkko Sakkinen
2014-09-24 9:05 ` [PATCH v1 03/12] tpm: TPM2 support for tpm_pcr_read() Jarkko Sakkinen
2014-09-24 16:53 ` Jason Gunthorpe
2014-09-24 19:43 ` Jarkko Sakkinen
2014-09-24 20:14 ` Peter Hüwe
2014-09-24 20:16 ` Jason Gunthorpe
2014-09-24 9:05 ` [PATCH v1 04/12] tpm: TPM2 support for tpm_do_selftest() Jarkko Sakkinen
2014-09-24 9:05 ` [PATCH v1 05/12] tpm: added tpm2_get_tpm_pt() Jarkko Sakkinen
2014-09-24 9:05 ` [PATCH v1 06/12] tpm: TPM2 support for tpm_pcr_extend() Jarkko Sakkinen
2014-09-24 9:05 ` [PATCH v1 07/12] tpm: TPM2 support for tpm_get_random() Jarkko Sakkinen
2014-09-24 9:05 ` [PATCH v1 08/12] tpm: TPM2 support for tpm_startup() Jarkko Sakkinen
2014-09-24 9:05 ` [PATCH v1 09/12] tpm: TPM2 support for tpm_gen_interrupt() Jarkko Sakkinen
2014-09-24 9:06 ` [PATCH v1 10/12] tpm: TPM 2.0 FIFO Interface Jarkko Sakkinen
2014-09-24 16:59 ` Jason Gunthorpe
2014-09-24 19:30 ` Jarkko Sakkinen
2014-09-24 9:06 ` [PATCH v1 11/12] tpm: Driver for TPM 2.0 CRB Interface Jarkko Sakkinen
2014-09-24 17:05 ` Jason Gunthorpe
2014-09-24 19:28 ` Jarkko Sakkinen
2014-09-25 13:56 ` Jarkko Sakkinen
2014-09-24 9:06 ` [PATCH v1 12/12] tpm: TPM2 sysfs attributes Jarkko Sakkinen
2014-09-24 17:13 ` Jason Gunthorpe
2014-09-24 17:34 ` [tpmdd-devel] " Stefan Berger
2014-09-24 17:59 ` Jason Gunthorpe
2014-09-24 18:50 ` Jarkko Sakkinen
2014-09-24 20:39 ` Peter Hüwe
2014-09-24 20:50 ` Jason Gunthorpe
2014-09-24 18:36 ` Peter Hüwe
2014-09-24 19:02 ` Jarkko Sakkinen
2014-09-24 20:19 ` Jason Gunthorpe
2014-09-24 20:35 ` Peter Hüwe
2014-09-24 20:46 ` Jason Gunthorpe [this message]
2014-09-26 17:19 ` Jarkko Sakkinen
2014-09-30 20:07 ` [tpmdd-devel] " Jarkko Sakkinen
2014-09-30 20:12 ` Jason Gunthorpe
2014-10-02 12:30 ` Jarkko Sakkinen
2014-09-24 17:28 ` [PATCH v1 00/12] tpm: TPM2 support Jarkko Sakkinen
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=20140924204627.GA12407@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=PeterHuewe@gmx.de \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@selhorst.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 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.