public inbox for linux-integrity@vger.kernel.org
 help / color / mirror / Atom feed
* Regression in tpm_tis driver: the TPM now fatally offlines itself after a few hours of use
@ 2018-07-11 17:04 James Bottomley
  2018-07-11 17:11 ` [PATCH] tpm.h: increase poll timings to fix tpm_tis regression James Bottomley
  0 siblings, 1 reply; 10+ messages in thread
From: James Bottomley @ 2018-07-11 17:04 UTC (permalink / raw)
  To: linux-integrity; +Cc: Jarkko Sakkinen, Thorsten Leemhuis, Nayna Jain

First a caveat: all my laptop security goes through the TPM, so I'm a
much more industrial consumer of the technology than most users, who
don't use a TPM at all.

However, since 4.18-rc1 I've been seeing these errors with the TPM:

jejb@jarvis:~> dmesg|grep tpm
[    3.282605] tpm_tis MSFT0101:00: 2.0 TPM (device-id 0xFE, rev-id 2)
[14566.626614] tpm tpm0: Operation Timed out
[14566.626621] tpm tpm0: tpm2_load_context: failed with a system error -62
[14568.626607] tpm tpm0: tpm_try_transmit: tpm_send: error -62
[14570.626594] tpm tpm0: tpm_try_transmit: tpm_send: error -62
[14570.626605] tpm tpm0: tpm2_load_context: failed with a system error -62
[14572.626526] tpm tpm0: tpm_try_transmit: tpm_send: error -62
[14577.710441] tpm tpm0: tpm_try_transmit: tpm_send: error -62
[14579.710418] tpm tpm0: tpm_try_transmit: tpm_send: error -62
[14581.710404] tpm tpm0: tpm_try_transmit: tpm_send: error -62
...

What happens is that I get one command that errors out with ETIME and
from that point on every TPM operation always returns -ETIME and it's
impossible to recover the TPM by any means except a reboot.

There are only three patches to tpm_tis in the merge window and it
looks like reverting this one fixes the problem:

commit 424eaf910c329ab06ad03a527ef45dcf6a328f00
Author: Nayna Jain <nayna@linux.vnet.ibm.com>
Date:   Wed May 16 01:51:25 2018 -0400

    tpm: reduce polling time to usecs for even finer granularity

As far as I can tell, all that patch does is cause the TPM to be poked
far more often to see if it's finished, but something about this rate
of poking is causing it to drop off its bus.  Based on this theory,
I've got a proposed fix which increases the timing parameters so we can
maintain the performance benefits of the above patch while remedying
the regression (I'll send it as a reply to this report).

Regards,

James

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

end of thread, other threads:[~2018-07-16 20:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-11 17:04 Regression in tpm_tis driver: the TPM now fatally offlines itself after a few hours of use James Bottomley
2018-07-11 17:11 ` [PATCH] tpm.h: increase poll timings to fix tpm_tis regression James Bottomley
2018-07-11 18:21   ` Jason Gunthorpe
2018-07-11 19:08     ` James Bottomley
2018-07-11 20:01       ` Jason Gunthorpe
2018-07-11 20:39         ` James Bottomley
2018-07-11 20:51           ` Peter Huewe
2018-07-11 20:54             ` James Bottomley
2018-07-11 21:06             ` Jason Gunthorpe
2018-07-16 20:16       ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox