linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Regression between Linux 3.16 and 4.8/4.9 on Lenovo X60 with coreboot
@ 2017-04-04 16:29 Paul Menzel
  2017-04-04 17:15 ` [tpmdd-devel] " Jason Gunthorpe
  0 siblings, 1 reply; 15+ messages in thread
From: Paul Menzel @ 2017-04-04 16:29 UTC (permalink / raw)
  To: tpmdd-devel; +Cc: Linux Kernel Mailing List

Dear Linux folks,


Currently, TPM support is added to the coreboot project for the Lenovo 
X60 [1].

Unfortunately, there seems to have been a regression between Linux 3.16 
and 4.8 and 4.9, so that the Linux kernel doesn’t create the TPM device.

```
$ more /proc/version Linux version 3.16.0-4-686-pae 
(debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) 
#1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07)
$ journalctl -k -o cat | grep -i tpm
tpm_tis 00:08: 1.2 TPM (device-id 0x3202, rev-id 5)
tpm_tis 00:08: Issuing TPM_STARTUP
```

The device `/dev/tpm0` is present.

Here are the results with Linux 4.8.15.

```
kernel: [    0.000000] Linux version 4.8.0-0.bpo.2-686-pae 
(debian-kernel@lists.debian.org) (gcc version 4.9.2 (Debian 4.9.2-10) ) 
#1 SMP Debian 4.8.15-2~bpo8+2 (2017-01-17)
[…]
kernel: [   11.302522] tpm tpm0: tpm_transmit: tpm_send: error -5
kernel: [   11.302598] tpm_tis 00:08: Could not get TPM timeouts and 
durations
```

Remove module and run `sudo modprobe tpm_tis itpm=1 force=1`.

```
kernel: [   35.024386] tpm_tis tpm_tis: 1.2 TPM (device-id 0x3202, rev-id 5)
kernel: [   49.160752] tpm_tis 00:08: can't request region for resource 
[mem 0xfed40000-0xfed44fff]
kernel: [   49.160865] tpm_tis: probe of 00:08 failed with error -16
```

And here with Linux 4.9.13.

```
kernel: [ 7.813547] tpm_tis 00:08: 1.2 TPM (device-id 0x3202, rev-id 5)
kernel: [ 7.891026] tpm tpm0: Issuing TPM_STARTUP
kernel: [ 8.042783] tpm tpm0: Unable to read burstcount
kernel: [ 8.042893] tpm tpm0: tpm_transmit: tpm_send: error -16
kernel: [ 8.042900] tpm_tis 00:08: Could not get TPM timeouts and duration
```

If I am not mistaken, the error code 16 is for the macro `EBUSY`.

It’d be great, if the TPM would also be created in the newer Linux 
Kernel versions, so that Debian users can upgrade to the upcoming stable 
release, which ships Linux 4.9.

Unfortunately, I won’t be able to bisect the commit introducing the 
regression. Could you please tell me how to debug, why the burstcount 
cannot be read.


Kind regards,

Paul


[1] https://review.coreboot.org/13410/

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [tpmdd-devel] Regression between Linux 3.16 and 4.8/4.9 on Lenovo X60 with coreboot
@ 2017-04-05 11:03 Maciej S. Szmigiero
  2017-04-05 13:36 ` Jarkko Sakkinen
  2017-04-06  6:18 ` Paul Menzel
  0 siblings, 2 replies; 15+ messages in thread
From: Maciej S. Szmigiero @ 2017-04-05 11:03 UTC (permalink / raw)
  To: pmenzel; +Cc: jgunthorpe, tpmdd-devel, linux-kernel, GNUtoo

Hi Paul,

> tpm tpm0: Unable to read burstcount
> tpm tpm0: tpm_transmit: tpm_send: error -16
> tpm_tis tpm_tis: Could not get TPM timeouts and durations

This looks like a regression I had on ThinkPad X61S.

You can try with a patch from the following commit
which fixed it for me:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1d70fe9d9c3a4c627f9757cbba5d628687b121c1

It is included in mainline kernel 4.10.2.

Maciej

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-04-08 20:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-04 16:29 Regression between Linux 3.16 and 4.8/4.9 on Lenovo X60 with coreboot Paul Menzel
2017-04-04 17:15 ` [tpmdd-devel] " Jason Gunthorpe
2017-04-04 17:44   ` Paul Menzel
2017-04-05 11:03 Maciej S. Szmigiero
2017-04-05 13:36 ` Jarkko Sakkinen
2017-04-06  6:18 ` Paul Menzel
2017-04-06 11:52   ` Maciej S. Szmigiero
2017-04-06 16:55   ` Jason Gunthorpe
2017-04-06 18:26     ` Paul Menzel
2017-04-06 19:10       ` Jason Gunthorpe
2017-04-07 20:13         ` Jarkko Sakkinen
2017-04-07 20:58           ` Paul Menzel
2017-04-06 18:58     ` Jarkko Sakkinen
2017-04-08 10:40     ` Denis 'GNUtoo' Carikli
2017-04-08 20:25       ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).