mbox series

[v4,0/3] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations

Message ID 20191009212831.29081-1-jarkko.sakkinen@linux.intel.com (mailing list archive)
Headers show
Series tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations | expand

Message

Jarkko Sakkinen Oct. 9, 2019, 9:28 p.m. UTC
commit db4d8cb9c9f2af71c4d087817160d866ed572cc9 upstream

This backport is for v4.14 and v4.19 The backport requires non-racy
behaviour from TPM 1.x sysfs code. Thus, the dependecies for that
are included.

NOTE: 1/3 is only needed for v4.14.

v4:
* There was unnecessary assignment inside TPM_CHIP_FLAG_TPM2 branch (does
  not cause any run-time issue).
v3:
* Fixed the cover letter and the subject prefix. My deepest apologies
  for all the hassle :-(
v2:
* Something happened when merging 3/3 that write lock was taken
  twice. Fixed in this version. Did also sanity check test with
  TPM2:
  echo devices > /sys/power/pm_test && echo mem > /sys/power/state

Cc: linux-integrity@vger.kernel.org
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Vadim Sukhomlinov <sukhomlinov@google.com>
Link: https://lore.kernel.org/stable/20190712152734.GA13940@kroah.com/

Jarkko Sakkinen (2):
  tpm: migrate pubek_show to struct tpm_buf
  tpm: use tpm_try_get_ops() in tpm-sysfs.c.

Vadim Sukhomlinov (1):
  tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations

 drivers/char/tpm/tpm-chip.c  |   9 +-
 drivers/char/tpm/tpm-sysfs.c | 201 +++++++++++++++++++++--------------
 drivers/char/tpm/tpm.h       |  13 ---
 3 files changed, 125 insertions(+), 98 deletions(-)

Comments

Greg Kroah-Hartman Oct. 10, 2019, 8:28 a.m. UTC | #1
On Thu, Oct 10, 2019 at 12:28:28AM +0300, Jarkko Sakkinen wrote:
> commit db4d8cb9c9f2af71c4d087817160d866ed572cc9 upstream
> 
> This backport is for v4.14 and v4.19 The backport requires non-racy
> behaviour from TPM 1.x sysfs code. Thus, the dependecies for that
> are included.
> 
> NOTE: 1/3 is only needed for v4.14.

How can a 0/X have a git commit id?

:)

greg k-h
Jarkko Sakkinen Oct. 14, 2019, 10:39 a.m. UTC | #2
On Thu, Oct 10, 2019 at 10:28:22AM +0200, Greg KH wrote:
> On Thu, Oct 10, 2019 at 12:28:28AM +0300, Jarkko Sakkinen wrote:
> > commit db4d8cb9c9f2af71c4d087817160d866ed572cc9 upstream
> > 
> > This backport is for v4.14 and v4.19 The backport requires non-racy
> > behaviour from TPM 1.x sysfs code. Thus, the dependecies for that
> > are included.
> > 
> > NOTE: 1/3 is only needed for v4.14.
> 
> How can a 0/X have a git commit id?
> 
> :)
> 
> greg k-h

It cannot. I just mentioned it here because the whole purpose
of two other dependecies is to support the backport of that
upstream commit.

/Jarkko.