Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1550521 > unrolled thread

Re: [PATCH v7 2/2] tpm: add securityfs support for TPM 2.0 firmware event log

Started byNayna <nayna@linux.vnet.ibm.com>
First post2017-01-04 09:50 +0100
Last post2017-01-04 14:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v7 2/2] tpm: add securityfs support for TPM 2.0 firmware  event log Nayna <nayna@linux.vnet.ibm.com> - 2017-01-04 09:50 +0100
    Re: [PATCH v7 2/2] tpm: add securityfs support for TPM 2.0 firmware  event log Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-01-04 14:10 +0100

#1550521 — Re: [PATCH v7 2/2] tpm: add securityfs support for TPM 2.0 firmware event log

FromNayna <nayna@linux.vnet.ibm.com>
Date2017-01-04 09:50 +0100
SubjectRe: [PATCH v7 2/2] tpm: add securityfs support for TPM 2.0 firmware event log
Message-ID<sVPqF-2eb-5@gated-at.bofh.it>

On 01/03/2017 07:03 PM, Jarkko Sakkinen wrote:
> On Tue, Jan 03, 2017 at 01:09:18PM +0530, Nayna wrote:
>>
>>
>> On 01/03/2017 03:42 AM, Jarkko Sakkinen wrote:
>>> On Sun, Dec 11, 2016 at 12:35:33AM -0500, Nayna Jain wrote:
>>>> Unlike the device driver support for TPM 1.2, the TPM 2.0 does
>>>> not support the securityfs pseudo files for displaying the
>>>> firmware event log.
>>>>
>>>> This patch enables support for providing the TPM 2.0 event log in
>>>> binary form. TPM 2.0 event log supports a crypto agile format that
>>>> records multiple digests, which is different from TPM 1.2. This
>>>> patch enables the tpm_bios_log_setup for TPM 2.0  and adds the
>>>> event log parser which understand the TPM 2.0 crypto agile format.
>>>>
>>>> Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
>>>
>>> There is something fundamentally wrong in this commit.
>>>
>>> You must not allow this feature unless CONFIG_OF is set. It is the only
>>> interface where the supply path of the event log is well defined on
>>> platforms that include a TPM 2.0 chip.
>>
>> As per current implementation, if ACPI with TPM 2.0 doesn't support event
>> log, tpm_read_log_acpi() is expected to return rc and tpm_bios_log_setup
>> will not create securityfs. This is inline with our design for TPM 1.2 event
>> log.
>
> At minimum you must have a check for TPM_CHIP_FLAG_TPM2 in the beginning
> of tpm_read_log_acpi. It is wrong to even try to open TCPA in this case.

Sure, will add this check and return -ENODEV if check passes.

Thanks & Regards,
     - Nayna

>
> /Jarkko
>

[toc] | [next] | [standalone]


#1550750

FromJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date2017-01-04 14:10 +0100
Message-ID<sVTui-55P-31@gated-at.bofh.it>
In reply to#1550521
On Wed, Jan 04, 2017 at 02:08:06PM +0530, Nayna wrote:
> 
> 
> On 01/03/2017 07:03 PM, Jarkko Sakkinen wrote:
> > On Tue, Jan 03, 2017 at 01:09:18PM +0530, Nayna wrote:
> > > 
> > > 
> > > On 01/03/2017 03:42 AM, Jarkko Sakkinen wrote:
> > > > On Sun, Dec 11, 2016 at 12:35:33AM -0500, Nayna Jain wrote:
> > > > > Unlike the device driver support for TPM 1.2, the TPM 2.0 does
> > > > > not support the securityfs pseudo files for displaying the
> > > > > firmware event log.
> > > > > 
> > > > > This patch enables support for providing the TPM 2.0 event log in
> > > > > binary form. TPM 2.0 event log supports a crypto agile format that
> > > > > records multiple digests, which is different from TPM 1.2. This
> > > > > patch enables the tpm_bios_log_setup for TPM 2.0  and adds the
> > > > > event log parser which understand the TPM 2.0 crypto agile format.
> > > > > 
> > > > > Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
> > > > 
> > > > There is something fundamentally wrong in this commit.
> > > > 
> > > > You must not allow this feature unless CONFIG_OF is set. It is the only
> > > > interface where the supply path of the event log is well defined on
> > > > platforms that include a TPM 2.0 chip.
> > > 
> > > As per current implementation, if ACPI with TPM 2.0 doesn't support event
> > > log, tpm_read_log_acpi() is expected to return rc and tpm_bios_log_setup
> > > will not create securityfs. This is inline with our design for TPM 1.2 event
> > > log.
> > 
> > At minimum you must have a check for TPM_CHIP_FLAG_TPM2 in the beginning
> > of tpm_read_log_acpi. It is wrong to even try to open TCPA in this case.
> 
> Sure, will add this check and return -ENODEV if check passes.

Yeah, this is acceptable for me.

> Thanks & Regards,
>     - Nayna

/Jarkko

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web