From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v4 4/4] ima_tpm.sh: Fix calculating PCR aggregate
Date: Thu, 1 Oct 2020 09:26:37 +0200 [thread overview]
Message-ID: <20201001072637.GA32109@dell5510> (raw)
In-Reply-To: <b10815a3a0abade8ec8872757ab5ac2a4f7839f4.camel@linux.ibm.com>
Hi Mimi,
> <snip>
> > +get_pcr10_aggregate()
> > +{
> > + local params pcr
> > + local msg="$ERRMSG_EVMCTL"
> > + local res=TCONF
> > +
> > + if [ -z "$MISSING_EVMCTL" ]; then
> > + params="--ignore-violations" <===
> Violations should cause the measurement list verification to fail.
I didn't get this one. the idea is: TCONF for old evmctl version (failure can be
caused by old version, but TFAIL for new version).
> > + msg=
> > + res=TFAIL
> > + elif check_ima_policy_cmdline "tcb"; then
> > + tst_res TCONF "using builtin IMA TCB policy $ERRMSG_EVMCTL"
> > + return
> > + fi
> > +
> > + evmctl -v ima_measurement $params $BINARY_MEASUREMENTS > hash.txt 2>&1
> > + if [ $? -ne 0 -a -z "$MISSING_EVMCTL" ]; then
> > + tst_res TFAIL "evmctl failed $ERRMSG_EVMCTL"
> > + tst_res TINFO "hash file:"
> > + cat hash.txt >&2
> > + return
> > + fi
> > +
> > + pcr=$(grep -E "^($ALGORITHM: )*PCRAgg.*:" hash.txt \
> The IMA measurement list may contain records for other PCR 10. The
> output may contain other PCRs. Using "PCRAgg.*10:" is safer.
> Probably need to use "grep -m 1 -E" as well.
+1 good point.
Kind regards,
Petr
prev parent reply other threads:[~2020-10-01 7:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 16:02 [LTP] [PATCH v4 0/4] TPM 2.0 fixes in IMA tests Petr Vorel
2020-09-30 16:02 ` [LTP] [PATCH v4 1/4] IMA: Move get_algorithm_digest(), set_digest_index() to ima_setup.sh Petr Vorel
2020-09-30 16:02 ` [LTP] [PATCH v4 2/4] IMA: Rewrite ima_boot_aggregate.c to new API Petr Vorel
2020-09-30 16:02 ` [LTP] [PATCH v4 3/4] ima_tpm.sh: Fix calculating boot aggregate Petr Vorel
2020-09-30 16:02 ` [LTP] [PATCH v4 4/4] ima_tpm.sh: Fix calculating PCR aggregate Petr Vorel
2020-10-01 3:32 ` Mimi Zohar
2020-10-01 7:26 ` Petr Vorel [this message]
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=20201001072637.GA32109@dell5510 \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/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