TencentOS-kernel/drivers/char/tpm
James Bottomley 152a904c96 tpm_tis: Clean up locality release
commit e42acf104d6e0bd7ccd2f09103d5be5e6d3c637c upstream.

The current release locality code seems to be based on the
misunderstanding that the TPM interrupts when a locality is released:
it doesn't, only when the locality is acquired.

Furthermore, there seems to be no point in waiting for the locality to
be released.  All it does is penalize the last TPM user.  However, if
there's no next TPM user, this is a pointless wait and if there is a
next TPM user, they'll pay the penalty waiting for the new locality
(or possibly not if it's the same as the old locality).

Fix the code by making release_locality as simple write to release
with no waiting for completion.

Cc: stable@ger.kernel.org
Fixes: 33bafe90824b ("tpm_tis: verify locality released before returning from release_locality")
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 12:52:35 +08:00
..
eventlog tpm: efi: Don't create binary_bios_measurements file for an empty log 2021-03-16 16:40:40 +08:00
st33zp24 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm-chip.c tpm: Unify the mismatching TPM space buffer sizes 2021-03-16 16:33:55 +08:00
tpm-dev-common.c tpm: Fix TIS locality timeout problems 2021-03-16 16:31:16 +08:00
tpm-dev.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm-dev.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm-interface.c tpm: fix wrong return value in tpm_pcr_extend 2021-03-16 16:26:58 +08:00
tpm-sysfs.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm.h tpm: Unify the mismatching TPM space buffer sizes 2021-03-16 16:33:55 +08:00
tpm1-cmd.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm2-cmd.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm2-space.c tpm: Unify the mismatching TPM space buffer sizes 2021-03-16 16:33:55 +08:00
tpm_atmel.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_atmel.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_crb.c tpm_crb: fix fTPM on AMD Zen+ CPUs 2021-03-16 16:36:37 +08:00
tpm_ftpm_tee.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_ftpm_tee.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_i2c_atmel.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_i2c_infineon.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_i2c_nuvoton.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_ibmvtpm.c tpm: ibmvtpm: Wait for buffer to be set before proceeding 2021-03-16 16:37:01 +08:00
tpm_ibmvtpm.h tpm: ibmvtpm: Wait for buffer to be set before proceeding 2021-03-16 16:37:01 +08:00
tpm_infineon.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_nsc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_ppi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_tis.c tpm_tis: Disable interrupts on ThinkPad T490s 2021-03-16 16:40:47 +08:00
tpm_tis_core.c tpm_tis: Clean up locality release 2021-04-12 12:52:35 +08:00
tpm_tis_core.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_tis_spi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpm_vtpm_proxy.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tpmrm-dev.c tpm: Unify the mismatching TPM space buffer sizes 2021-03-16 16:33:55 +08:00
xen-tpmfront.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00