android_kernel_oneplus_msm8998/drivers/char/tpm
Josh Zimmerman 0f4fa2138e tpm: Issue a TPM2_Shutdown for TPM2 devices.
commit d1bd4a792d3961a04e6154118816b00167aad91a upstream.

If a TPM2 loses power without a TPM2_Shutdown command being issued (a
"disorderly reboot"), it may lose some state that has yet to be
persisted to NVRam, and will increment the DA counter. After the DA
counter gets sufficiently large, the TPM will lock the user out.

NOTE: This only changes behavior on TPM2 devices. Since TPM1 uses sysfs,
and sysfs relies on implicit locking on chip->ops, it is not safe to
allow this code to run in TPM1, or to add sysfs support to TPM2, until
that locking is made explicit.

Signed-off-by: Josh Zimmerman <joshz@google.com>
Cc: stable@vger.kernel.org
Fixes: 74d6b3ceaa ("tpm: fix suspend/resume paths for TPM 2.0")
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-21 07:44:58 +02:00
..
st33zp24 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2015-11-05 15:32:38 -08:00
Kconfig tpm: Update KConfig text to include TPM2.0 FIFO chips 2015-03-18 22:43:07 +01:00
Makefile tpm/tpm_i2c_stm_st33: Split tpm_i2c_tpm_st33 in 2 layers (core + phy) 2015-03-18 22:43:06 +01:00
tpm-chip.c tpm: Issue a TPM2_Shutdown for TPM2 devices. 2017-07-21 07:44:58 +02:00
tpm-dev.c tpm: Provide strong locking for device removal 2017-07-21 07:44:58 +02:00
tpm-interface.c tpm: Provide strong locking for device removal 2017-07-21 07:44:58 +02:00
tpm-sysfs.c tpm: Issue a TPM2_Shutdown for TPM2 devices. 2017-07-21 07:44:58 +02:00
tpm.h tpm: Provide strong locking for device removal 2017-07-21 07:44:58 +02:00
tpm2-cmd.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
tpm_acpi.c
tpm_atmel.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
tpm_atmel.h
tpm_crb.c tpm_crb: check for bad response size 2017-05-25 14:30:07 +02:00
tpm_eventlog.c tpm_eventlog.c: fix binary_bios_measurements 2016-04-12 09:08:47 -07:00
tpm_eventlog.h vTPM: support little endian guests 2015-10-19 01:09:30 +02:00
tpm_i2c_atmel.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
tpm_i2c_infineon.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
tpm_i2c_nuvoton.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
tpm_ibmvtpm.c vTPM: fix memory allocation flag for rtce buffer at kernel boot 2015-10-19 01:00:49 +02:00
tpm_ibmvtpm.h tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send 2015-03-06 22:35:48 +01:00
tpm_infineon.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
tpm_nsc.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
tpm_of.c TPM: Avoid reference to potentially freed memory 2015-11-09 17:52:55 +02:00
tpm_ppi.c tpm: move the PPI attributes to character device directory. 2015-10-19 01:01:20 +02:00
tpm_tis.c tpm: Get rid of chip->pdev 2017-07-21 07:44:58 +02:00
xen-tpmfront.c tpm xen: Remove bogus tpm_chip_unregister 2017-01-06 11:16:16 +01:00