From: Mimi Zohar <zohar@linux.ibm.com>
To: "Singh, Jashandeep" <jashandeep.singh@hpe.com>,
Roberto Sassu <roberto.sassu@huawei.com>,
Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Cc: Eric Snowberg <eric.snowberg@oracle.com>,
"linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>,
"linux-security-module@vger.kernel.org"
<linux-security-module@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jashandeep Singh <jdsw@juniper.net>
Subject: Re: [PATCH] ima: select the SHA384 PCR bank for the boot aggregate
Date: Wed, 26 Aug 2026 19:14:17 -0400 [thread overview]
Message-ID: <21bf74a181df485f9daf47f9740972443e31471d.camel@linux.ibm.com> (raw)
In-Reply-To: <PH7PR84MB16549E7A6AC842D358493B0F96AE2@PH7PR84MB1654.NAMPRD84.PROD.OUTLOOK.COM>
Hi Jashan,
Mail to the kernel mailing lists are in plain text. Please refer to
https://docs.kernel.org/process/submitting-patches.html#no-mime-no-links-no-compression-no-attachments-just-plain-text
On Wed, 2026-08-26 at 22:35 +0000, Singh, Jashandeep wrote:
> Thanks Mimi.
>
>
> Agreed that all allocated banks are extended via tpm_pcr_extend() - but that's
> the PCR-extend (write) path. The failure is in ima_calc_boot_aggregate(), which
> reads PCRs 0-9 from a *single* selected bank.
>
>
> The issue is that a TPM can be provisioned with *only* the SHA-384 bank enabled,
> while the default IMA hash algorithm is SHA-256. In this configuration, the
> current selection logic only matches the configured IMA default, then SHA-256,
> and then SHA-1 - it never considers SHA-384.
It's walking the list of allocated TPM banks and, if allocated, sets bank_idx.
for (i = 0; i < ima_tpm_chip->nr_allocated_banks; i++) {
crypto_id = ima_tpm_chip->allocated_banks[i].crypto_id;
if (crypto_id == hash->algo) {
bank_idx = i;
break;
}
The question is why isn't the sha384 bank found in the list of
nr_allocated_banks?
Mimi
>
> Adding a SHA-384 match allows the boot aggregate to be computed correctly
> (sha384:...) instead of returning 0 and logging "No suitable TPM algorithm for
> boot aggregate". The fact that the SHA-384 bank can be selected and the boot
> aggregate computed also confirms that the SHA-384 bank is recognized and
> allocated, rather than being missing.
next prev parent reply other threads:[~2026-08-26 23:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 19:11 [PATCH] ima: select the SHA384 PCR bank for the boot aggregate Singh, Jashandeep
2026-08-26 21:20 ` Mimi Zohar
[not found] ` <PH7PR84MB16549E7A6AC842D358493B0F96AE2@PH7PR84MB1654.NAMPRD84.PROD.OUTLOOK.COM>
2026-08-26 23:14 ` Mimi Zohar [this message]
2026-08-27 13:17 ` Roberto Sassu
2026-08-27 14:46 ` Singh, Jashandeep
2026-08-27 14:56 ` Roberto Sassu
2026-08-27 15:49 ` Mimi Zohar
2026-08-27 20:03 ` Singh, Jashandeep
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=21bf74a181df485f9daf47f9740972443e31471d.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=dmitry.kasatkin@gmail.com \
--cc=eric.snowberg@oracle.com \
--cc=jashandeep.singh@hpe.com \
--cc=jdsw@juniper.net \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=roberto.sassu@huawei.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 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.