From: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
To: Mimi Zohar <zohar@linux.ibm.com>, linux-integrity@vger.kernel.org
Cc: Jerry Snitselaar <jsnitsel@redhat.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ima: support calculating the boot_aggregate based on different TPM banks
Date: Mon, 27 Jan 2020 08:50:31 -0800 [thread overview]
Message-ID: <87e6b531-3596-4523-a6b0-629ae8fd6995@linux.microsoft.com> (raw)
In-Reply-To: <1580140919-6127-2-git-send-email-zohar@linux.ibm.com>
On 1/27/2020 8:01 AM, Mimi Zohar wrote:
> +
> + for (i = 0; i < ima_tpm_chip->nr_allocated_banks; i++) {
> + if (ima_tpm_chip->allocated_banks[i].alg_id == d.alg_id)
> + break;
> + }
> +
> + if (i == ima_tpm_chip->nr_allocated_banks)
> + d.alg_id = ima_tpm_chip->allocated_banks[0].alg_id;
> +
Can the number of allocated banks (ima_tpm_chip->nr_allocated_banks) be
zero? Should that be checked before accessing "allocated_banks"?
-lakshmi
next prev parent reply other threads:[~2020-01-27 16:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-27 16:01 [PATCH 1/2] ima: use the IMA configured hash algo to calculate the boot aggregate Mimi Zohar
2020-01-27 16:01 ` [PATCH 2/2] ima: support calculating the boot_aggregate based on different TPM banks Mimi Zohar
2020-01-27 16:50 ` Lakshmi Ramasubramanian [this message]
2020-01-27 18:01 ` Mimi Zohar
2020-01-27 20:55 ` Ken Goldman
2020-01-28 14:19 ` Roberto Sassu
2020-01-28 15:40 ` Mimi Zohar
2020-01-28 16:31 ` Roberto Sassu
2020-01-29 23:20 ` Mimi Zohar
2020-01-30 7:31 ` James Bottomley
2020-01-27 17:38 ` [PATCH 1/2] ima: use the IMA configured hash algo to calculate the boot aggregate Roberto Sassu
2020-01-27 18:16 ` Mimi Zohar
2020-01-27 18:35 ` Mimi Zohar
2020-01-27 20:49 ` Jerry Snitselaar
2020-01-27 21:31 ` Mimi Zohar
2020-01-29 8:30 ` Petr Vorel
2020-01-29 22:51 ` Mimi Zohar
2020-01-30 8:41 ` Petr Vorel
2020-01-30 15:27 ` Roberto Sassu
2020-01-30 15:40 ` Roberto Sassu
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=87e6b531-3596-4523-a6b0-629ae8fd6995@linux.microsoft.com \
--to=nramas@linux.microsoft.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=jsnitsel@redhat.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).