public inbox for linux-integrity@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Mimi Zohar <zohar@linux.ibm.com>
Cc: ltp@lists.linux.it,
	Lakshmi Ramasubramanian <nramas@linux.microsoft.com>,
	Mimi Zohar <zohar@linux.vnet.ibm.com>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	linux-integrity@vger.kernel.org
Subject: Re: [PATCH v2 3/4] ima_tpm.sh: Fix calculating boot aggregate
Date: Wed, 30 Sep 2020 08:57:53 +0200	[thread overview]
Message-ID: <20200930065753.GC21664@dell5510> (raw)
In-Reply-To: <4ce0e22ef2812a9be66b45b5ce32902810f17efd.camel@linux.ibm.com>

> On Tue, 2020-09-29 at 14:17 +0200, Petr Vorel wrote:
> > Hi,

> > >  test1()
> > >  {
> > >  	tst_res TINFO "verify boot aggregate"

> > > -	local zero="0000000000000000000000000000000000000000"
> > >  	local tpm_bios="$SECURITYFS/tpm0/binary_bios_measurements"
> > > -	local ima_measurements="$ASCII_MEASUREMENTS"
> > > -	local boot_aggregate boot_hash line
> > > +	local cmd="evmctl ima_boot_aggregate"
> > > +	local boot_aggregate cmd zero

> > > -	# IMA boot aggregate
> > > -	read line < $ima_measurements
> > > -	boot_hash=$(echo $line | awk '{print $(NF-1)}' | cut -d':' -f2)
> > > +	if [ "$MISSING_EVMCTL" = 1 ]; then
> > > +		if [ -f "$tpm_bios" ]; then
> > I leaved this error during rebase:
> > if [ ! -f "$tpm_bios" ]; then

> > I'm still investigating corner case issue when
> > /sys/kernel/security/tpm0/binary_bios_measurements
> > is not presented (mostly when no TPM device, thus IMA "TPM-bypass" code being
> > used, but sometimes also for TPM 2.0 which does not export event log).

> There's another case as well.  On one of my test systems with a TPM 2.0
> chip, but without secure boot enabled, the binary_bios_measurements
> exists, but it can't be accessed.  dmesg contains a secure boot status
> line.
So you can view binary_bios_measurements with ls, but don't have permission to
read. Interesting.

> Mimi

Kind regards,
Petr

  reply	other threads:[~2020-09-30  6:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 18:50 [PATCH v2 0/4] TPM 2.0 fixes in IMA tests Petr Vorel
2020-09-25 18:50 ` [PATCH v2 1/4] IMA: Move get_algorithm_digest(), set_digest_index() to ima_setup.sh Petr Vorel
2020-09-25 18:50 ` [PATCH v2 2/4] IMA: Rewrite ima_boot_aggregate.c to new API Petr Vorel
2020-09-25 18:50 ` [PATCH v2 3/4] ima_tpm.sh: Fix calculating boot aggregate Petr Vorel
2020-09-29 12:17   ` Petr Vorel
2020-09-29 12:33     ` Mimi Zohar
2020-09-30  6:57       ` Petr Vorel [this message]
2020-09-25 18:50 ` [PATCH v2 4/4] ima_tpm.sh: Fix calculating PCR aggregate Petr Vorel

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=20200930065753.GC21664@dell5510 \
    --to=pvorel@suse.cz \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=ltp@lists.linux.it \
    --cc=nramas@linux.microsoft.com \
    --cc=zohar@linux.ibm.com \
    --cc=zohar@linux.vnet.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