[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1549031589.6993.7.camel@linux.ibm.com>
Date: Fri, 01 Feb 2019 09:33:09 -0500
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
Roberto Sassu <roberto.sassu@...wei.com>
Cc: david.safford@...com, monty.wiseman@...com,
matthewgarrett@...gle.com, linux-integrity@...r.kernel.org,
linux-security-module@...r.kernel.org, keyrings@...r.kernel.org,
linux-kernel@...r.kernel.org, silviu.vlasceanu@...wei.com
Subject: Re: [PATCH v9 6/6] tpm: pass an array of tpm_extend_digest
structures to tpm_pcr_extend()
On Fri, 2019-02-01 at 15:41 +0200, Jarkko Sakkinen wrote:
> On Fri, Feb 01, 2019 at 03:39:49PM +0200, Jarkko Sakkinen wrote:
> > On Fri, Feb 01, 2019 at 11:06:41AM +0100, Roberto Sassu wrote:
> > > Currently, tpm_pcr_extend() accepts as an input only a SHA1 digest.
> > >
> > > This patch replaces the hash parameter of tpm_pcr_extend() with an array of
> > > tpm_digest structures, so that the caller can provide a digest for each PCR
> > > bank currently allocated in the TPM.
> > >
> > > tpm_pcr_extend() will not extend banks for which no digest was provided,
> > > as it happened before this patch, but instead it requires that callers
> > > provide the full set of digests. Since the number of digests will always be
> > > chip->nr_allocated_banks, the count parameter has been removed.
> > >
> > > Due to the API change, ima_pcr_extend() and pcrlock() have been modified.
> > > Since the number of allocated banks is not known in advance, the memory for
> > > the digests must be dynamically allocated. To avoid performance degradation
> > > and to avoid that a PCR extend is not done due to lack of memory, the array
> > > of tpm_digest structures is allocated by the users of the TPM driver at
> > > initialization time.
> > >
> > > Signed-off-by: Roberto Sassu <roberto.sassu@...wei.com>
> >
> > Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
> > Tested-by: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
>
> I tested that this does not break TPM. I'd need someone to check that
> this does not break IMA. After that, I'm ready to apply this series.
Thanks! I just finished compiling, rebooting, and verifying the IMA
boot-aggregate matches.
While compiling, I saw some messages that "TPM_BUFSIZE is redefined"
for tpm_i2c_infineon, tpm_i2c_nuvoton, and st33zp24. Didn't look to
see if this is a result of this patch set or not.
The IMA boot-aggregate matches the PCRs.
Tested-by: Mimi Zohar <zohar@...ux.ibm.com> (on x86 for TPM 1.2 & PTT
TPM 2.0)
Powered by blists - more mailing lists