From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nayna Jain Subject: Re: TPM2.0: No binary_bios_measurements file in securityFS Date: Wed, 13 Sep 2017 17:33:56 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4324339177482879205==" 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: "Nasim, Kam" , "tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" List-Id: tpmdd-devel@lists.sourceforge.net This is a multi-part message in MIME format. --===============4324339177482879205== Content-Type: multipart/alternative; boundary="------------318E33988B830231410FB72D" Content-Language: en-US This is a multi-part message in MIME format. --------------318E33988B830231410FB72D Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id v8DC3whT120961 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,=20 > tpm_tis_core.ko and tpm_tis.ko). > > I noticed that while my /sys/kernel/security directory is created and=20 > mounted to securityFS, it is empty. > > Looking at tpm_bios_log_setup() in tpm1_event.log, I see that this is=20 > being done during chip registration: > TPM 2.0 binary_bios_measurements event log file support is currently not=20 available for ACPI based platform. It is only for device tree based=20 platform. And I think you are using ACPI. Thanks & Regards, =A0=A0=A0 - Nayna > > if (chip->flags & TPM_CHIP_FLAG_TPM2) > > chip->bin_log_seqops.seqops =3D > > &tpm2_binary_b_measurements_seqops; > > =A0=A0=A0 else > > chip->bin_log_seqops.seqops =3D > > &tpm_binary_b_measurements_seqops; > > chip->bios_dir[cnt] =3D > > securityfs_create_file("binary_bios_measurements", > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0440, chip->bios= _dir[0], > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (void *)&chip->b= in_log_seqops, > > &tpm_bios_measurements_ops); > > =A0=A0=A0 if (IS_ERR(chip->bios_dir[cnt])) > > =A0=A0=A0=A0=A0=A0=A0 goto err; > > My TPM modules are loaded properly and I can interact with TPM using=20 > userspace TSS2 applications: > > $ sudo lsmod | grep tpm > > Password: > > tpm_crb 6458=A0 0 > > tpm_tis 5950=A0 0 > > tpm_tis_core 10054=A0 1 tpm_tis > > tpm 48093=A0 3 tpm_crb,tpm_tis,tpm_tis_core > > 2017-09-08T19:39:16.239 controller-0 kernel: warning [=A0=A0=A0 0.00000= 0]=20 > ACPI: TPM2 000000007b7c8000 00034 (v03 INTEL=A0=A0 S2600WT 00000002 INT= L=20 > 01000013) > > 2017-09-08T19:39:16.252 controller-0 kernel: info [=A0=A0=A0 5.457568]=20 > tpm_tis MSFT0101:00: 2.0 TPM (device-id 0x1A, rev-id 16) > > How and when would this file be created? For that matter I don=92t even= =20 > 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 --------------318E33988B830231410FB72D Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id v8DC3whT120961



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

Hi folks,<= /span>


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

=A0=

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

=A0=

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 available for ACPI based platform. It is only for device tree based platform. And I think you are using ACPI.

Thanks & Regards,
=A0=A0=A0 - Nayna

=A0=

if (chip->flags &a= mp; TPM_CHIP_FLAG_TPM2)

=A0=A0=A0=A0=A0=A0=A0 chip->bin_log_seqops.seqops =3D

=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 &tpm2_binary_b_measurements_seqops;

=A0=A0=A0 else

=A0=A0=A0=A0=A0=A0=A0 chip->bin_log_seqops.seqops =3D

=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 &tpm_binary_b_measurements_seqops;

=A0=

=A0=

=A0=A0=A0 chip->bios_dir[cnt] =3D

=A0=A0=A0=A0=A0=A0=A0 securityfs_create_file("binary_bios_measurements",=

=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0440, chip->bios_dir[0],

=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (void *)&chip->bin_log_seqops,

=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &tpm_bios_measurements_ops);

=A0=A0=A0 if (IS_ERR(chip->bios_dir[cnt]))

=A0=A0=A0=A0=A0=A0=A0= goto err;

=A0=

=A0=

My TPM modules are loaded properly and I can interact with TPM using userspace TSS2 applications:

=A0=

$ sudo lsmod | grep t= pm

Password:<= /span>

tpm_crb=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 6458=A0 0

tpm_tis=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 5950=A0 0

tpm_tis_core=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 10054=A0 1 tpm_tis

tpm=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 48093=A0 3 tpm_crb,tpm_tis,tpm_tis_core

=A0=

=A0=

2017-09-08T19:39:16.2= 39 controller-0 kernel: warning [=A0=A0=A0 0.000000] ACPI: TPM2 000000007b7c8000 00034 (v03 INTEL=A0=A0 S2600WT 00000002 INTL 01000013)

2017-09-08T19:39:16.2= 52 controller-0 kernel: info [=A0=A0=A0 5.457568] tpm_tis MSFT0101:00: 2.0 TPM (device-id 0x1A, rev-id 16)

=A0=

=A0=

How and when would th= is file be created? For that matter I don=92t even have a /sys/devices/pnp0/<pnp#>/pcrs file present

(I am on CentOS 7.3)<= o:p>

=A0=

=A0=

Thoughts?<= /span>

=A0=

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

--------------318E33988B830231410FB72D-- --===============4324339177482879205== 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 --===============4324339177482879205== 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 --===============4324339177482879205==--