From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
Mimi Zohar <zohar@linux.ibm.com>,
linux-integrity@vger.kernel.org
Subject: Re: [PATCH v4 1/1] tpm: add sysfs exports for all banks of PCR registers
Date: Wed, 26 Aug 2020 16:15:20 +0300 [thread overview]
Message-ID: <20200826131520.GA6532@linux.intel.com> (raw)
In-Reply-To: <1598369621.7939.22.camel@HansenPartnership.com>
On Tue, Aug 25, 2020 at 08:33:41AM -0700, James Bottomley wrote:
> On Tue, 2020-08-25 at 18:27 +0300, Jarkko Sakkinen wrote:
> > On Mon, Aug 24, 2020 at 01:20:46PM -0700, James Bottomley wrote:
> > > On Mon, 2020-08-24 at 22:44 +0300, Jarkko Sakkinen wrote:
> > > > On Fri, Aug 21, 2020 at 04:38:47PM -0300, Jason Gunthorpe wrote:
> > > > > On Thu, Aug 20, 2020 at 09:14:44AM -0700, James Bottomley
> > > > > wrote:
> > > > >
> > > > > > > eg we can't do it because we can't access /dev/tpm for
> > > > > > > permissions or something.
> > > > > >
> > > > > > I already said that: we can't it's root.root 0600
> > > > > > currently. All the TSSs seem to change at least /dev/tpmrm
> > > > > > to tpm.tpm 0660 but we can't do that in the kernel because
> > > > > > there's no fixed tpm uid/gid.
> > > > >
> > > > > Permissions is a pretty good reason to add a sysfs file.
> > > > >
> > > > > Jason
> > > >
> > > > I'm not sure why suid/sgid utility to read pcrs would be worse.
> > >
> > > We don't do root running or suid/sgid binaries any more because
> > > they're exceptional security risks. That's why both TSSs for TPM
> > > 2.0 change the device ownership. For Trousers and TPM 1.2 we used
> > > to run the daemon as root until we started getting CVEs about it.
> > >
> > > James
> >
> > OK, then a binary blob for pcrs would be sufficient.
>
> From a sysfs perspective we only do one value per file and we don't
> export binary if a valid and useful ascii representation exists. On
> both of those kernel principles, the current proposal is canonical.
>
> James
The event log is also exported as a binary. This patch set pollutes the
sysfs and adds too much overhead for maintaining. Every single algorithm
will needs its own file and needs to be patched to the kernel.
A single 'pcrs' blob could with contents as <alg id, data> pairs would
remain static.
If you speak about principles, please add a reference and/or CC your
patch set also to sysfs maintainers. All I care if what is pragmatically
the best choice.
/Jarkko
next prev parent reply other threads:[~2020-08-26 13:15 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 21:35 [PATCH v4 0/1] add sysfs exports for TPM 2 PCR registers James Bottomley
2020-08-17 21:35 ` [PATCH v4 1/1] tpm: add sysfs exports for all banks of " James Bottomley
2020-08-18 16:12 ` Jarkko Sakkinen
2020-08-18 16:19 ` Jarkko Sakkinen
2020-08-18 16:26 ` Jarkko Sakkinen
2020-08-18 16:46 ` Jason Gunthorpe
2020-08-18 18:26 ` Mimi Zohar
2020-08-18 18:36 ` Jason Gunthorpe
2020-08-18 18:55 ` Mimi Zohar
2020-08-19 12:02 ` Jason Gunthorpe
2020-08-19 13:27 ` Mimi Zohar
2020-08-19 14:09 ` Jason Gunthorpe
2020-08-19 14:53 ` Mimi Zohar
2020-08-19 14:55 ` Mimi Zohar
2020-08-19 22:16 ` Jarkko Sakkinen
2020-08-19 22:48 ` Jerry Snitselaar
2020-08-19 23:26 ` Jason Gunthorpe
2020-08-20 15:46 ` Jarkko Sakkinen
2020-08-19 14:56 ` Serge E. Hallyn
2020-08-19 22:15 ` Jarkko Sakkinen
2020-08-19 15:17 ` James Bottomley
2020-08-19 16:18 ` Jason Gunthorpe
2020-08-19 16:57 ` Mimi Zohar
2020-08-19 17:17 ` Jason Gunthorpe
2020-08-19 20:09 ` James Bottomley
2020-08-19 23:21 ` Jason Gunthorpe
2020-08-20 16:14 ` James Bottomley
2020-08-20 16:55 ` Serge E. Hallyn
2020-08-21 17:41 ` Jarkko Sakkinen
2020-08-21 19:38 ` Jason Gunthorpe
2020-08-24 19:44 ` Jarkko Sakkinen
2020-08-24 20:20 ` James Bottomley
2020-08-25 15:27 ` Jarkko Sakkinen
2020-08-25 15:33 ` James Bottomley
2020-08-26 13:15 ` Jarkko Sakkinen [this message]
2020-08-26 13:19 ` Jarkko Sakkinen
2020-08-24 21:57 ` Jason Gunthorpe
2020-08-19 22:14 ` Jarkko Sakkinen
2020-08-18 19:03 ` James Bottomley
2020-08-19 22:13 ` Jarkko Sakkinen
2020-08-19 22:01 ` Jarkko Sakkinen
2020-08-18 16:44 ` James Bottomley
2020-08-18 17:17 ` Jason Gunthorpe
2020-08-18 18:49 ` James Bottomley
2020-08-19 21:53 ` Jarkko Sakkinen
2020-08-19 22:46 ` James Bottomley
2020-08-20 15:22 ` Jarkko Sakkinen
2020-08-19 21:33 ` Jarkko Sakkinen
2020-09-14 17:41 ` Jarkko Sakkinen
2020-09-14 19:19 ` James Bottomley
2020-09-15 11:22 ` Jarkko Sakkinen
2020-10-08 11:45 ` Petr Vorel
2020-10-08 14:29 ` James Bottomley
2020-10-09 16:12 ` 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=20200826131520.GA6532@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=jgg@nvidia.com \
--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 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.