From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nasim, Kam" Subject: Re: TPM2.0: No binary_bios_measurements file in securityFS Date: Wed, 13 Sep 2017 15:01:16 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1397196585409548370==" Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Nayna Jain , "tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" List-Id: tpmdd-devel@lists.sourceforge.net --===============1397196585409548370== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CA352AD04C14CE4985F6AEB6AB8C130E3EDB8A6EALAMBCcorpadwrs_" --_000_CA352AD04C14CE4985F6AEB6AB8C130E3EDB8A6EALAMBCcorpadwrs_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thank you Nayna for getting back to me, yes I am using ACPI so that would e= xplain it. Which brings me to my last issue, I am not seeing the PCRS file in either o= f these locations: /sys/devices/pnp0//pcrs /sys/devices/platform/tpm_tis/pcrs I am loading TPM as kernel modules so is this behavior not supported when T= PM is not built-in, or are these files specific to TPM 1.2? Thanks, Kam From: Nayna Jain [mailto:nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org] Sent: Wednesday, September 13, 2017 8:04 AM To: Nasim, Kam; tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Subject: Re: [tpmdd-devel] TPM2.0: No binary_bios_measurements file in secu= rityFS On 09/12/2017 04:14 AM, Nasim, Kam wrote: Hi folks, I am building my TPM 2.0 driver as Kernel modules (tpm.ko, tpm_tis_core.ko = and tpm_tis.ko). I noticed that while my /sys/kernel/security directory is created and mount= ed to securityFS, it is empty. Looking at tpm_bios_log_setup() in tpm1_event.log, I see that this is being= done during chip registration: TPM 2.0 binary_bios_measurements event log file support is currently not av= ailable for ACPI based platform. It is only for device tree based platform.= And I think you are using ACPI. Thanks & Regards, - Nayna if (chip->flags & TPM_CHIP_FLAG_TPM2) chip->bin_log_seqops.seqops =3D &tpm2_binary_b_measurements_seqops; else chip->bin_log_seqops.seqops =3D &tpm_binary_b_measurements_seqops; chip->bios_dir[cnt] =3D securityfs_create_file("binary_bios_measurements", 0440, chip->bios_dir[0], (void *)&chip->bin_log_seqops, &tpm_bios_measurements_ops); if (IS_ERR(chip->bios_dir[cnt])) goto err; My TPM modules are loaded properly and I can interact with TPM using usersp= ace TSS2 applications: $ sudo lsmod | grep tpm Password: tpm_crb 6458 0 tpm_tis 5950 0 tpm_tis_core 10054 1 tpm_tis tpm 48093 3 tpm_crb,tpm_tis,tpm_tis_core 2017-09-08T19:39:16.239 controller-0 kernel: warning [ 0.000000] ACPI: T= PM2 000000007b7c8000 00034 (v03 INTEL S2600WT 00000002 INTL 01000013) 2017-09-08T19:39:16.252 controller-0 kernel: info [ 5.457568] tpm_tis MS= FT0101:00: 2.0 TPM (device-id 0x1A, rev-id 16) How and when would this file be created? For that matter I don't even have = a /sys/devices/pnp0//pcrs file present (I am on CentOS 7.3) Thoughts? Thanks, Kam ---------------------------------------------------------------------------= --- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ tpmdd-devel mailing list tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/tpmdd-devel --_000_CA352AD04C14CE4985F6AEB6AB8C130E3EDB8A6EALAMBCcorpadwrs_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Thank you Nayna for ge= tting back to me, yes I am using ACPI so that would explain it.<= /span>

 

Which brings me to my = last issue, I am not seeing the PCRS file in either of these locations:

/sys/devices/pnp0/<pnp#>/= pcrs

/sys/devices/platform/tpm_tis/p= crs

 

I am loading TPM as ke= rnel modules so is this behavior not supported when TPM is not built-in, or= are these files specific to TPM 1.2?

 

 

Thanks,
Kam

From: Nayna Jain [mailto:nayna-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org]
Sent: Wednesday, September 13, 2017 8:04 AM
To: Nasim, Kam; tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [tpmdd-devel] TPM2.0: No binary_bios_measurements file = in securityFS

 

 

 

On 09/12/2017 04:14 AM, Nasim, Kam wrote:=

Hi folks,


I am building my TPM 2.0 driver as Kernel modules (tpm.ko, tpm_tis_core.ko = and tpm_tis.ko).

 

I noticed that while my /sys/ke= rnel/security directory is created and mounted to securityFS, it is empty.

 

Looking at tpm_bios_log_setup()= in tpm1_event.log, I see that this is being done during chip registration:=

TPM 2.0 binary_bios_measurements eve= nt log file support is currently not available for ACPI based platform. It = is only for device tree based platform. And I think you are using ACPI.

Thanks & Regards,
    - Nayna

 

if (chip->flags & TPM_CH= IP_FLAG_TPM2)

     &= nbsp;  chip->bin_log_seqops.seqops =3D

     &= nbsp;      &tpm2_binary_b_measurements_seqops;=

    else<= o:p>

     &= nbsp;  chip->bin_log_seqops.seqops =3D

     &= nbsp;      &tpm_binary_b_measurements_seqops;<= /span>

 

 

    chip->bio= s_dir[cnt] =3D

     &= nbsp;  securityfs_create_file("binary_bios_measurements",

     &= nbsp;           &nbs= p; 0440, chip->bios_dir[0],

     &= nbsp;           &nbs= p; (void *)&chip->bin_log_seqops,

     &= nbsp;           &nbs= p; &tpm_bios_measurements_ops);

    if (IS_ERR(c= hip->bios_dir[cnt]))

     &= nbsp;  goto err;

 

 

My TPM modules are loaded prope= rly and I can interact with TPM using userspace TSS2 applications:

 

$ sudo lsmod | grep tpm<= o:p>

Password:

tpm_crb    =              64= 58  0

tpm_tis    =              59= 50  0

tpm_tis_core   &= nbsp;       10054  1 tpm_tis=

tpm    &nbs= p;            &= nbsp;  48093  3 tpm_crb,tpm_tis,tpm_tis_core

 

 

2017-09-08T19:39:16.239 control= ler-0 kernel: warning [    0.000000] ACPI: TPM2 000000007b7c= 8000 00034 (v03 INTEL   S2600WT 00000002 INTL 01000013)

2017-09-08T19:39:16.252 control= ler-0 kernel: info [    5.457568] tpm_tis MSFT0101:00: 2.0 T= PM (device-id 0x1A, rev-id 16)

 

 

How and when would this file be= created? For that matter I don’t even have a /sys/devices/pnp0/<p= np#>/pcrs file present

(I am on CentOS 7.3)

 

 

Thoughts?

 

Thanks,

Kam




----------------------------------------------------------------------=
--------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot




_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists=
.sourceforge.net
h=
ttps://lists.sourceforge.net/lists/listinfo/tpmdd-devel

 

--_000_CA352AD04C14CE4985F6AEB6AB8C130E3EDB8A6EALAMBCcorpadwrs_-- --===============1397196585409548370== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot --===============1397196585409548370== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ tpmdd-devel mailing list tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/tpmdd-devel --===============1397196585409548370==--