linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Greg KH <greg@kroah.com>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>,
	linux-integrity@vger.kernel.org, Mimi Zohar <zohar@linux.ibm.com>,
	linux-api@vger.kernel.org
Subject: Re: [PATCH RESEND v4 0/1] add sysfs exports for TPM 2 PCR registers
Date: Tue, 8 Sep 2020 21:05:13 +0300	[thread overview]
Message-ID: <20200908180513.GB5390@linux.intel.com> (raw)
In-Reply-To: <20200908054552.GB303404@kroah.com>

On Tue, Sep 08, 2020 at 07:45:52AM +0200, Greg KH wrote:
> On Mon, Sep 07, 2020 at 02:52:08PM -0700, James Bottomley wrote:
> > On Mon, 2020-09-07 at 16:23 +0300, Jarkko Sakkinen wrote:
> > > On Mon, Sep 07, 2020 at 07:38:24AM +0200, Greg KH wrote:
> > > > Please just use a binary blob format.  Binary sysfs files are
> > > > exactly what this is for, you are just passing the data through the
> > > > kernel from the hardware to userspace.
> > > > 
> > > > You can have 24 binary files if that makes it easier, but the
> > > > existing format really is an abuse of sysfs.
> > 
> > There is no existing format for TPM 2.0 ... that's part of the problem
> > since we certainly didn't want to carry over the TPM 1.2 format.
> 
> Ok, then no, if there is not already a binary format then you should not
> use a binary sysfs file as you are then just sending a kernel structure
> to userspace, not a hardware structure.
> 
> > I've got to say I think binary attributes are actively evil.  I can see
> > they're a necessity when there's no good way to represent the data they
> > contain, like the bios measurement log or firmware code or a raw
> > interface like we do for the SMP frame code in libsas.  But when
> > there's a well understood and easy to produce user friendly non-binary
> > representation, I think dumping binary is inimical to being a good API.
> 
> Agreed.
> 
> thanks,
> 
> greg k-h

Looking at the patch, something like <device>/pcrs/<hash>/<index> would
be a bit cleaner representation than the current <device>/pcrs-<hash>/<index>.

/Jarkko

  reply	other threads:[~2020-09-08 18:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06 20:32 [PATCH RESEND v4 0/1] add sysfs exports for TPM 2 PCR registers James Bottomley
2020-09-06 20:32 ` [PATCH RESEND v4 1/1] tpm: add sysfs exports for all banks of " James Bottomley
2020-09-07  5:39   ` Greg KH
2020-09-07  5:59     ` James Bottomley
2020-09-07 13:21   ` Jarkko Sakkinen
2020-09-07 17:37     ` Greg KH
2020-09-08 17:39       ` Jarkko Sakkinen
2020-09-07  5:38 ` [PATCH RESEND v4 0/1] add sysfs exports for TPM 2 " Greg KH
2020-09-07 13:23   ` Jarkko Sakkinen
2020-09-07 13:36     ` Greg KH
2020-09-07 21:52     ` James Bottomley
2020-09-08  5:45       ` Greg KH
2020-09-08 18:05         ` Jarkko Sakkinen [this message]
2020-09-08 18:14           ` James Bottomley
2020-09-09  7:07             ` Greg KH
2020-09-11 11:48               ` Jarkko Sakkinen
2020-09-11 11:47             ` Jarkko Sakkinen
  -- strict thread matches above, loose matches on Subject: below --
2020-11-29 22:30 James Bottomley
2020-11-30  8:18 ` Greg KH
2020-11-30 15:21   ` Mimi Zohar
2020-11-30 15:26   ` 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=20200908180513.GB5390@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=greg@kroah.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=zohar@linux.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).