All of lore.kernel.org
 help / color / mirror / Atom feed
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 3/4] ima_tpm.sh: Fix calculating boot aggregate
Date: Fri, 25 Sep 2020 20:30:02 +0200	[thread overview]
Message-ID: <20200925183002.GA14078@dell5510> (raw)
In-Reply-To: <20200925174439.9534-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
> +			tst_res TCONF "missing $tpm_bios, $ERRMSG_EVMCTL"
> +			return
> +		fi
> +		cmd="ima_boot_aggregate"
This is supposed to be:
		cmd="ima_boot_aggregate -f $tpm_bios"

+ there are other needed fixes => v2 needed.

Kind regards,
Petr

WARNING: multiple messages have this Message-ID
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 3/4] ima_tpm.sh: Fix calculating boot aggregate
Date: Fri, 25 Sep 2020 20:30:02 +0200	[thread overview]
Message-ID: <20200925183002.GA14078@dell5510> (raw)
In-Reply-To: <20200925174439.9534-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
> +			tst_res TCONF "missing $tpm_bios, $ERRMSG_EVMCTL"
> +			return
> +		fi
> +		cmd="ima_boot_aggregate"
This is supposed to be:
		cmd="ima_boot_aggregate -f $tpm_bios"

+ there are other needed fixes => v2 needed.

Kind regards,
Petr

  reply	other threads:[~2020-09-25 18:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 17:44 [PATCH 0/4] TPM 2.0 fixes in IMA tests Petr Vorel
2020-09-25 17:44 ` [LTP] " Petr Vorel
2020-09-25 17:44 ` [PATCH 1/4] IMA: Move get_algorithm_digest(), set_digest_index() to ima_setup.sh Petr Vorel
2020-09-25 17:44   ` [LTP] " Petr Vorel
2020-09-25 17:44 ` [PATCH 2/4] IMA: Rewrite ima_boot_aggregate.c to new API Petr Vorel
2020-09-25 17:44   ` [LTP] " Petr Vorel
2020-09-25 17:44 ` [PATCH 3/4] ima_tpm.sh: Fix calculating boot aggregate Petr Vorel
2020-09-25 17:44   ` [LTP] " Petr Vorel
2020-09-25 18:30   ` Petr Vorel [this message]
2020-09-25 18:30     ` Petr Vorel
2020-09-25 17:44 ` [PATCH 4/4] ima_tpm.sh: Fix calculating PCR aggregate Petr Vorel
2020-09-25 17:44   ` [LTP] " 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=20200925183002.GA14078@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 \
    --subject='Re: [PATCH 3/4] ima_tpm.sh: Fix calculating boot aggregate' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.