From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Jerry Snitselaar <jsnitsel@redhat.com>
Cc: Mimi Zohar <zohar@linux.ibm.com>,
Jason Gunthorpe <jgg@nvidia.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-integrity@vger.kernel.org
Subject: Re: [PATCH v4 1/1] tpm: add sysfs exports for all banks of PCR registers
Date: Thu, 20 Aug 2020 18:46:02 +0300 [thread overview]
Message-ID: <20200820154602.GB5462@linux.intel.com> (raw)
In-Reply-To: <87lfiamevo.fsf@jsnitsel.users.ipa.redhat.com>
On Wed, Aug 19, 2020 at 03:48:11PM -0700, Jerry Snitselaar wrote:
>
> Jarkko Sakkinen @ 2020-08-19 15:16 MST:
>
> > On Wed, Aug 19, 2020 at 10:53:38AM -0400, Mimi Zohar wrote:
> >> On Wed, 2020-08-19 at 11:09 -0300, Jason Gunthorpe wrote:
> >> > On Wed, Aug 19, 2020 at 09:27:33AM -0400, Mimi Zohar wrote:
> >> > > On Wed, 2020-08-19 at 09:02 -0300, Jason Gunthorpe wrote:
> >> > > > On Tue, Aug 18, 2020 at 02:55:50PM -0400, Mimi Zohar wrote:
> >> > > >
> >> > > > > The problem is that there isn't just one single userspace library or
> >> > > > > application for reading PCRs. So now not only is there the kernel
> >> > > > > "boot_aggregate" regression testing, but regression testing of the tool
> >> > > > > itself to support multiple methods of reading the PCRs.
> >> > > >
> >> > > > I was thinking just open code
> >> > > > open("/dev/tpm")
> >> > > > write(read_pcrs_cmd)
> >> > > > read(read_pcrs_cmd)
> >> > > >
> >> > > > It isn't particularly hard to retrive the PCRs, don't really need to
> >> > > > depend on a library.
> >> > >
> >> > > Ok, do you want to contribute it to ima-evm-utils? While you're at it,
> >> > > do you also have code to parse the TPM 2.0 event log that you could
> >> > > contribute?
> >> > >
> >> > > Seriously, we shouldn't be (re-)writing code to do this.
> >> >
> >> > The kernel should not be used a dumping ground to work around a
> >> > dysfunctional userspace either. :(
> >> >
> >> > You've basicaly said you can't rely on a sane userspace library
> >> > because *reasons* so we need to dump stuff in the kernel instead.
> >> >
> >> > It is not a good justification to add new uAPI.
> >> >
> >> > James seems to have the same basic conclusion too, unfortunately.
> >>
> >> "dysfunctional" is dropping existing TPM 1.2 sysfs support, which was
> >> done without consideration about existing applications/tools (e.g. ima-
> >> evm-utils, ltp) and without community input. It's not only James that
> >> is advocating for exporting the TPM PCRs, but Jerry Snitselaar, who
> >> reviewed this patch and exported the TPM version, and Nayna Jain, who
> >> exported the TPM 2.0 event log. I'm pretty sure there are a number of
> >> other people who would agree.
> >>
> >> Mimi
> >
> > This is not true. TPM 1.2 sysfs was not dropped.
> >
> > Not adding something does not mean technically dropping something.
> >
> > /Jarkko
>
> When reviewing it I honestly didn't give much(any?) thought to whether
> it should be there. My thought was it adhered to the 1 value per file
> rule unlike the 1.2 pcrs file and that was about it.
>
> IIRC when 2.0 was added there was the issue of things like the 1.2 pcrs
> not conforming to standards, possible issues of races, and a question of
> what exactly should be exported. 1.2 has a number of files for doing
> things that I think were also handled by ppi and userspace.
>
> I guess the question is where does the line get drawn. My exporting the
> major version of the tpm probably could've been handled instead with a
> pr_info spitting it out for people to grab out of dmesg.
>
>
> Jerry
TPM protocol version is a different case tha dumping all the PCRs as
ASCII. It fairly unintrusive feature for the kernel, kernel has this
knowledge stored already and it is constant for a boot cycle.
/Jarkko
next prev parent reply other threads:[~2020-08-20 15:46 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 [this message]
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
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=20200820154602.GB5462@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=jgg@nvidia.com \
--cc=jsnitsel@redhat.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.