From: "Singh, Jashandeep" <jashandeep.singh@hpe.com>
To: Mimi Zohar <zohar@linux.ibm.com>
Cc: Roberto Sassu <roberto.sassu@huaweicloud.com>,
Roberto Sassu <roberto.sassu@huawei.com>,
Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
"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>,
"Garimella, Siva" <venkata-siva.garimella@hpe.com>,
"Kumar, Kamlesh" <kamlesh.kumar@hpe.com>
Subject: Re: [PATCH] ima: select the SHA384 PCR bank for the boot aggregate
Date: Thu, 27 Aug 2026 20:03:16 +0000 [thread overview]
Message-ID: <F9EB24A1-B4B1-43AC-9A35-C947CFE21AA3@hpe.com> (raw)
In-Reply-To: <837c208460cd7dae1259bd3fd7b8f176ab3597ba.camel@linux.ibm.com>
Thanks, Mimi and Roberto.
I will explore this approach and share the updated patch.
Regards,
Jashan
> On 27 Aug 2026, at 9:19 PM, Mimi Zohar <zohar@linux.ibm.com> wrote:
>
> On Thu, 2026-08-27 at 16:56 +0200, Roberto Sassu wrote:
>> On Thu, 2026-08-27 at 14:46 +0000, Singh, Jashandeep wrote:
>>> Mimi, the patch covers the case where the TPM is provisioned with a single PCR
>>> bank, SHA-384, while the default IMA hash is configured as SHA-256.
>>>
>>> The SHA-384 bank is present in nr_allocated_banks, but it matches neither the
>>> configured default (SHA-256) nor the current hardcoded fallbacks (SHA-256, then
>>> SHA-1). As a result, bank_idx remains -1, and we hit "No suitable TPM algorithm
>>> for boot aggregate", leaving the boot aggregate zeroed.
>>>
>>> Roberto, it is not strictly true that the boot aggregate algorithm is always the
>>> same as the default IMA hash algorithm.
>>>
>>> When the bank corresponding to the default hash is not allocated, the existing
>>> SHA-256/SHA-1 fallback logic selects a different bank than the default.
>>> Therefore, the boot aggregate can already use a different algorithm from the
>>> configured IMA hash.
>>>
>>> My patch adds SHA-384 as one more fallback for the case where SHA-384 is the
>>> only allocated bank. This allows users with such a configuration to have the
>>> boot aggregate computed, without requiring them to change their default IMA
>>> hash to SHA-384.
>>
>> That would work for your use case, but what about anyone using a single
>> SHA-512 PCR bank?
>>
>> Would it be fine to add a new Kconfig and kernel option to specify a
>> custom boot aggregate algorithm?
>
> Yes, I'm fine with defining a new Kconfig and kernel option.
>
> Examples:
> sha384: <digest> boot_aggregate, where the digest is calculated based on the TPM
> 384 bank PCRs.
>
> sha512: <digest> boot_aggregate, where the digest is calculated based on the TPM
> 512 bank PCRs.
>
> Mimi
prev parent reply other threads:[~2026-08-27 20:03 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
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 [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=F9EB24A1-B4B1-43AC-9A35-C947CFE21AA3@hpe.com \
--to=jashandeep.singh@hpe.com \
--cc=dmitry.kasatkin@gmail.com \
--cc=eric.snowberg@oracle.com \
--cc=jdsw@juniper.net \
--cc=kamlesh.kumar@hpe.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=roberto.sassu@huawei.com \
--cc=roberto.sassu@huaweicloud.com \
--cc=venkata-siva.garimella@hpe.com \
--cc=zohar@linux.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