From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: Nayna Jain <nayna@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
tpmdd-devel@lists.sourceforge.net
Subject: Re: [tpmdd-devel] [PATCH v6 0/2] enhance TPM 2.0 extend function to support multiple PCR banks
Date: Thu, 26 Jan 2017 00:57:45 +0200 [thread overview]
Message-ID: <20170125225745.62y4lpyoubegewci@intel.com> (raw)
In-Reply-To: <20170125225252.3plzxtl4vpuaayp7@intel.com>
On Thu, Jan 26, 2017 at 12:52:52AM +0200, Jarkko Sakkinen wrote:
> On Thu, Jan 26, 2017 at 12:04:01AM +0200, Jarkko Sakkinen wrote:
> > On Wed, Jan 25, 2017 at 04:08:55PM -0500, Stefan Berger wrote:
> > > On 01/25/2017 03:45 PM, Jarkko Sakkinen wrote:
> > > > On Fri, Jan 20, 2017 at 12:05:11PM -0500, Nayna Jain wrote:
> > > > > IMA extends its hash measurements in the TPM PCRs, based on policy.
> > > > > The existing in-kernel TPM extend function extends only the SHA1
> > > > > PCR bank. TPM 2.0 defines multiple PCR banks, to support different
> > > > > hash algorithms. The TCG TPM 2.0 Specification[1] recommends
> > > > > extending all active PCR banks to prevent malicious users from
> > > > > setting unused PCR banks with fake measurements and quoting them.
> > > > > This patch set adds support for extending all active PCR banks,
> > > > > as recommended.
> > > > >
> > > > > The first patch implements the TPM 2.0 capability to retrieve
> > > > > the list of active PCR banks.
> > > > >
> > > > > The second patch modifies the tpm_pcr_extend() and tpm2_pcr_extend()
> > > > > interface to support extending multiple PCR banks. The existing
> > > > > tpm_pcr_extend() interface expects only a SHA1 digest. Hence, to
> > > > > extend all active PCR banks with differing digest sizes for TPM 2.0,
> > > > > the SHA1 digest is padded with 0's as needed.
> > > > >
> > > > > [1] TPM 2.0 Specification referred here is "TCG PC Client Specific
> > > > > Platform Firmware Profile for TPM 2.0"
> > > > I pushed these patches. I had to resolve merge conflicts caused
> > > > by the min_rsp_body_length parameter in tpm_transmit_cmd. Can you
> > > > verify that I didn't break anything?
> > >
> > > It looks like this hunk here got into the wrong patch:
> > >
> > > @@ -1061,7 +1068,7 @@ ssize_t tpm2_get_pcr_allocation(struct tpm_chip *chip)
> > > tpm_buf_append_u32(&buf, 0);
> > > tpm_buf_append_u32(&buf, 1);
> > >
> > > - rc = tpm_transmit_cmd(chip, buf.data, PAGE_SIZE, 0,
> > > + rc = tpm_transmit_cmd(chip, buf.data, PAGE_SIZE, 9, 0,
> > > "get tpm pcr allocation");
> > > if (rc < 0)
> > > goto out;
> >
> > Thanks. I'll eventually fix this before sending the next pull request.
>
> I'll actually squash the patches and make it a static function. Its
> only call site is tpm2_auto_startup and remove the declaration from
> tpm.h. There's no point to have it there.
OK, now it should be better. I also moved tpm2_digest to tpm.h as it is
part of the API.
/Jarkko
next prev parent reply other threads:[~2017-01-25 22:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 17:05 [PATCH v6 0/2] enhance TPM 2.0 extend function to support multiple PCR banks Nayna Jain
2017-01-20 17:05 ` [PATCH v6 1/2] tpm: implement TPM 2.0 capability to get active " Nayna Jain
2017-01-26 12:23 ` [tpmdd-devel] " Stefan Berger
2017-01-27 6:30 ` Jarkko Sakkinen
2017-01-20 17:05 ` [PATCH v6 2/2] tpm: enhance TPM 2.0 PCR extend to support multiple banks Nayna Jain
2017-01-23 15:19 ` Jarkko Sakkinen
2017-01-23 16:41 ` Nayna
2017-01-24 11:59 ` Jarkko Sakkinen
2017-01-24 13:04 ` Nayna
2017-01-25 19:49 ` Jarkko Sakkinen
2017-01-20 20:51 ` [PATCH v6 0/2] enhance TPM 2.0 extend function to support multiple PCR banks Jarkko Sakkinen
2017-01-25 20:45 ` Jarkko Sakkinen
2017-01-25 21:08 ` [tpmdd-devel] " Stefan Berger
2017-01-25 22:04 ` Jarkko Sakkinen
2017-01-25 22:52 ` Jarkko Sakkinen
2017-01-25 22:57 ` Jarkko Sakkinen [this message]
2017-01-25 23:33 ` Jarkko Sakkinen
2017-01-26 14:34 ` Nayna
2017-01-27 17:23 ` Nayna
2017-01-29 15:19 ` Jarkko Sakkinen
2017-01-27 17:24 ` Nayna
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=20170125225745.62y4lpyoubegewci@intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=nayna@linux.vnet.ibm.com \
--cc=stefanb@linux.vnet.ibm.com \
--cc=tpmdd-devel@lists.sourceforge.net \
/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