From: Mimi Zohar <zohar@linux.ibm.com>
To: Lakshmi Ramasubramanian <nramas@linux.microsoft.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 13:01:38 -0500 [thread overview]
Message-ID: <1580148098.5088.32.camel@linux.ibm.com> (raw)
In-Reply-To: <87e6b531-3596-4523-a6b0-629ae8fd6995@linux.microsoft.com>
On Mon, 2020-01-27 at 08:50 -0800, Lakshmi Ramasubramanian wrote:
> 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"?
Yes, that might be the true, but I think the solution is not fixing
the problem here, but when ima_tpm_chip is set in ima_init().
tpm_default_chip() should be modified to return a TPM with at least
one bank enabled; and ima_init() needs to go into TPM-bypass mode if
there isn't.
Can anyone look into this please?
Mimi
next prev parent reply other threads:[~2020-01-27 18:01 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
2020-01-27 18:01 ` Mimi Zohar [this message]
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=1580148098.5088.32.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=jsnitsel@redhat.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nramas@linux.microsoft.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).