mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Jarkko Sakkinen <jarkko@kernel.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-integrity@vger.kernel.org
Cc: roberto.sassu@huawei.com, mapengyu@gmail.com,
	Paul Moore <paul@paul-moore.com>,
	linux-kernel@vger.kernel.org, christian@heusel.eu
Subject: Re: [RFC PATCH] tpm: Allow the TPM2 pcr_extend HMAC capability to be disabled on boot
Date: Wed, 06 Nov 2024 18:52:50 -0500	[thread overview]
Message-ID: <84fcb3e29f3aa1ea7a5b638307e500608bc8b11a.camel@linux.ibm.com> (raw)
In-Reply-To: <D5FHDIMJBWQM.2GWFOR0198360@kernel.org>

On Thu, 2024-11-07 at 01:22 +0200, Jarkko Sakkinen wrote:
> On Thu Nov 7, 2024 at 12:52 AM EET, James Bottomley wrote:
> > 
> > I'm a bit confused here.  It's TPM2_PCR_Extend we have the trouble with
> > (as Mimi says in her email that you quoted) not TPM2_GetRandom.
> > 
> > The random number generator reseed occurs in a kernel thread that fires
> > about once a minute, so it doesn't show up in really any of the boot
> > timings.  Plus even with sessions added, what there now isn't a
> > significant overhead even to the running kernel given it's asynchronous
> > and called infrequently.
> 
> Ah, right then we need the boot flag, and my earlier comments to the
> parameter apply. I've never used IMA so I don't actually even know in
> detail how it is using TPM.

Huh?  A simple explanation is that IMA-measurement maintains a measurement list,
similar to the pre-boot event log.  Each IMA-measurement record extends the TPM
PCR (default PCR 10).

Assuming IMA is enabled in the kernel, then just add "ima_policy=tcb" or
"ima_policy=critical_data" on the boot command line.  To view the measurement
records, cat <securityfs>/integrity/ima/ascii_runtime_measurements.  Normally
the IMA policy specified on the boot command line is replaced with a finer
grained custom policy.

Mimi


  parent reply	other threads:[~2024-11-06 23:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-15 19:39 Mimi Zohar
2024-10-15 21:29 ` Jarkko Sakkinen
2024-10-15 21:46   ` Jarkko Sakkinen
2024-11-06 22:26 ` Jarkko Sakkinen
2024-11-06 22:52   ` James Bottomley
2024-11-06 23:22     ` Jarkko Sakkinen
2024-11-06 23:40       ` Jarkko Sakkinen
2024-11-06 23:42         ` Jarkko Sakkinen
2024-11-06 23:52       ` Mimi Zohar [this message]
2024-11-07  0:03         ` Jarkko Sakkinen
2024-11-07  1:07           ` Mimi Zohar
2024-11-07  1:55             ` Jarkko Sakkinen
2024-11-07  3:14               ` Mimi Zohar
2024-11-07  6:32                 ` 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=84fcb3e29f3aa1ea7a5b638307e500608bc8b11a.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=christian@heusel.eu \
    --cc=jarkko@kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mapengyu@gmail.com \
    --cc=paul@paul-moore.com \
    --cc=roberto.sassu@huawei.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

all inboxes | Powered by JetHome®