From: Petr Vorel <pvorel@suse.cz>
To: 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 14:17:35 +0200 [thread overview]
Message-ID: <20200929121735.GA11889@dell5510> (raw)
In-Reply-To: <20200925185034.24155-4-pvorel@suse.cz>
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).
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:18 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 [this message]
2020-09-29 12:33 ` Mimi Zohar
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=20200929121735.GA11889@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.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