From: Mimi Zohar <zohar@linux.ibm.com>
To: Petr Vorel <pvorel@suse.cz>, ltp@lists.linux.it
Cc: 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: Tue, 29 Sep 2020 08:33:52 -0400 [thread overview]
Message-ID: <4ce0e22ef2812a9be66b45b5ce32902810f17efd.camel@linux.ibm.com> (raw)
In-Reply-To: <20200929121735.GA11889@dell5510>
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.
Mimi
>
> I'll send shortly v3.
>
> Kind regards,
> Petr
>
> > + tst_res TCONF "missing $tpm_bios, $ERRMSG_EVMCTL"
> > + return
> > + fi
> > + tst_check_cmds ima_boot_aggregate || return
> > + cmd="ima_boot_aggregate -f $tpm_bios"
> > + fi
> > + tst_res TINFO "using command: $cmd"
next prev parent reply other threads:[~2020-09-29 12:34 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 [this message]
2020-09-30 6:57 ` Petr Vorel
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=4ce0e22ef2812a9be66b45b5ce32902810f17efd.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=linux-integrity@vger.kernel.org \
--cc=ltp@lists.linux.it \
--cc=nramas@linux.microsoft.com \
--cc=pvorel@suse.cz \
--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