[lkml]   [2019]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations
On Thu, Jul 11, 2019 at 09:29:19AM -0700, Douglas Anderson wrote:
> From: Vadim Sukhomlinov <>
> commit db4d8cb9c9f2af71c4d087817160d866ed572cc9 upstream.
> TPM 2.0 Shutdown involve sending TPM2_Shutdown to TPM chip and disabling
> future TPM operations. TPM 1.2 behavior was different, future TPM
> operations weren't disabled, causing rare issues. This patch ensures
> that future TPM operations are disabled.
> Fixes: d1bd4a792d39 ("tpm: Issue a TPM2_Shutdown for TPM2 devices.")
> Cc:
> Signed-off-by: Vadim Sukhomlinov <>
> [dianders: resolved merge conflicts with mainline]
> Signed-off-by: Douglas Anderson <>
> Reviewed-by: Jarkko Sakkinen <>
> Signed-off-by: Jarkko Sakkinen <>
> This is the backport of the patch referenced above to 4.19 as was done
> in Chrome OS. See <> for details. It
> presumably applies to some older kernels. NOTE that the problem
> itself has existed for a long time, but continuing to backport this
> exact solution to super old kernels is out of scope for me. For those
> truly interested feel free to reference the past discussion [1].
> Reason for backport: mainline has commit a3fbfae82b4c ("tpm: take TPM
> chip power gating out of tpm_transmit()") and commit 719b7d81f204
> ("tpm: introduce tpm_chip_start() and tpm_chip_stop()") and it didn't
> seem like a good idea to backport 17 patches to avoid the conflict.

Careful with this, you can't backport this to any kernels that don't
have the sysfs ops locking changes or they will crash in sysfs code.


 \ /
  Last update: 2019-07-11 18:40    [W:0.044 / U:1.352 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site