tpm2-software / tpm2-tools

The source repository for the Trusted Platform Module (TPM2.0) tools
https://tpm2-software.github.io
708 stars 377 forks source link

"too much pcrs to get!" when testing on Skylake client platform with tpm2_listpcrs #294

Closed yunyings closed 7 years ago

yunyings commented 7 years ago

Platform information: Label: SKLS03 Processor: Skylake DT i7-6700 3.4GHz, R0/S0/N0 Stepping, GT2(0x1912), 4Core(s)/8Thread(s) Bios: SKLSE2R1.R00.X109.B01.1610182357 Chipset: SKL PCH-H, Q170, D1 Stepping OS: SLE12-SP3-Beta3 Kernel: 4.4.68-2-default

Details: SKLS03:~ # rpm -qa | grep tpm2 tpm2.0-tools-1.1.0-1.19.x86_64 tpm2-0-tss-devel-1.0-3.1.x86_64 tpm2.0-tools-debugsource-1.1.0-1.19.x86_64 tpm2-0-tss-1.0-3.1.x8664 SKLS03:~ # SKLS03:~ # dmesg |grep -i tpm [ 0.000000] ACPI: SSDT 0x000000008D2FA000 0004D6 (v02 Intel Tpm2Tabl 00001000 INTL 20150930) [ 0.000000] ACPI: TPM2 0x000000008D2F8000 000034 (v03 00000000 00000000) [ 1.212369] ima: No TPM chip found, activating TPM-bypass! SKLS03:~ # SKLS03:~ # tpm2_listpcrs too much pcrs to get! try to split into multiple calls...

snits commented 7 years ago

Hi yunying, This should be fixed upstream master now in commit c2586d4. I've fixed it for RHEL already, and will get a fix ready for Fedora. William, would you like a patch for the 1.1 branch?

williamcroberts commented 7 years ago

I don't have a 1.1 branch, but I can create it if folks want a long running 1.x series with backports. I am ok with that.

yunyings commented 7 years ago

Thanks Jerry for the information.

I just retested tpm2_listpcrs on the same HW/SW but with latest tpm2-tools master code, error "too much pcrs to get" is not seen:

SKLS03:~ # tpm2_listpcrs --version
tpm2_listpcrs, version 2.0.0-23-g412776b

SKLS03:~ # tpm2_listpcrs --tcti device
Bank/Algorithm: TPM_ALG_SHA1(0x0004)
PCR_00: 29 f4 4c be 08 48 af 09 e2 7b 57 dc 09 ec 6d 2c 53 26 68 c9
PCR_01: ff 42 11 7e 55 49 6b 0c cb 22 fb ef d3 70 94 41 a6 43 b1 a3
PCR_02: 73 32 a0 f6 8b b5 20 94 aa 35 e6 08 68 af 88 7d 7a 59 90 27
PCR_03: b2 a8 3b 0e bf 2f 83 74 29 9a 5b 2b df c3 1e a9 55 ad 72 36
PCR_04: e1 f7 00 f3 04 4c ac 0d 6d f7 a0 49 36 9a c5 bc ea 56 34 2e
PCR_05: 48 48 9b ef d7 f9 a8 d3 ce 15 47 ae 83 c1 21 04 0b 98 41 c1
PCR_06: b2 a8 3b 0e bf 2f 83 74 29 9a 5b 2b df c3 1e a9 55 ad 72 36
PCR_07: 3c c6 bc 36 3c ed bd bd c4 cd 7b fa 1c 74 61 6a 0c 2d 76 0b
PCR_08: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
PCR_09: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
PCR_10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
PCR_11: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
PCR_12: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
PCR_13: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
PCR_14: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
PCR_15: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
PCR_16: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
PCR_17: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
PCR_18: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
PCR_19: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
PCR_20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
PCR_21: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
PCR_22: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
PCR_23: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Bank/Algorithm: TPM_ALG_SHA256(0x000b)

Suppose this issue can be closed.

gwei3 commented 7 years ago

yes, commit c2586d4 provided good fixes for below two cases:

tpm2_listpcrs
tpm2_listpcrs -g 0xb

but below case will still trigger the issue: tpm2_listpcrs -L 0x4:17+0xb:17

we need some more fixes.

gwei3 commented 7 years ago

@yunyings PR #295 provided fix for below case based on upstream: tpm2_listpcrs -L 0x4:17+0xb:17

And we need some backporting if we need it for v1.1.

williamcroberts commented 7 years ago

Closed with the pull of @gwei3 PR #295. Thank you all.