1
0
Fork 0
alistair23-linux/drivers/char/tpm
Stefan Berger 22de4a5d57 tpm: ibmvtpm: Wait for buffer to be set before proceeding
[ Upstream commit d8d74ea3c0 ]

Synchronize with the results from the CRQs before continuing with
the initialization. This avoids trying to send TPM commands while
the rtce buffer has not been allocated, yet.

This patch fixes an existing race condition that may occurr if the
hypervisor does not quickly respond to the VTPM_GET_RTCE_BUFFER_SIZE
request sent during initialization and therefore the ibmvtpm->rtce_buf
has not been allocated at the time the first TPM command is sent.

Fixes: 132f762947 ("drivers/char/tpm: Add new device driver to support IBM vTPM")
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Acked-by: Nayna Jain <nayna@linux.ibm.com>
Tested-by: Nayna Jain <nayna@linux.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 13:17:42 +02:00
..
eventlog tpm: tpm2_bios_measurements_next should increase position index 2020-04-17 10:50:11 +02:00
st33zp24 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 399 2019-06-05 17:37:12 +02:00
Kconfig tpm/tpm_ftpm_tee: A driver for firmware TPM running inside TEE 2019-09-02 17:08:35 +03:00
Makefile tpm/tpm_ftpm_tee: A driver for firmware TPM running inside TEE 2019-09-02 17:08:35 +03:00
tpm-chip.c tpm: Unify the mismatching TPM space buffer sizes 2020-08-19 08:16:27 +02:00
tpm-dev-common.c tpm: Fix TIS locality timeout problems 2020-07-09 09:37:51 +02:00
tpm-dev.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm-dev.h tpm: Handle negative priv->response_len in tpm_common_read() 2020-01-14 20:08:21 +01:00
tpm-interface.c tpm: fix wrong return value in tpm_pcr_extend 2020-04-29 16:33:16 +02:00
tpm-sysfs.c tpm: Remove a deprecated comments about implicit sysfs locking 2019-09-02 17:08:35 +03:00
tpm.h tpm: Unify the mismatching TPM space buffer sizes 2020-08-19 08:16:27 +02:00
tpm1-cmd.c tpm: tpm_ibm_vtpm: Fix unallocated banks 2019-08-05 00:55:00 +03:00
tpm2-cmd.c tpm: Initialize crypto_id of allocated_banks to HASH_ALGO__LAST 2020-02-28 17:22:13 +01:00
tpm2-space.c tpm: Unify the mismatching TPM space buffer sizes 2020-08-19 08:16:27 +02:00
tpm_atmel.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_atmel.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_crb.c tpm_crb: fix fTPM on AMD Zen+ CPUs 2020-10-01 13:17:17 +02:00
tpm_ftpm_tee.c tpm/tpm_ftpm_tee: add shutdown call back 2020-01-12 12:21:41 +01:00
tpm_ftpm_tee.h tpm/tpm_ftpm_tee: A driver for firmware TPM running inside TEE 2019-09-02 17:08:35 +03:00
tpm_i2c_atmel.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
tpm_i2c_infineon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_i2c_nuvoton.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
tpm_ibmvtpm.c tpm: ibmvtpm: Wait for buffer to be set before proceeding 2020-10-01 13:17:42 +02:00
tpm_ibmvtpm.h tpm: ibmvtpm: Wait for buffer to be set before proceeding 2020-10-01 13:17:42 +02:00
tpm_infineon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_nsc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_ppi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_tis.c tpm: Switch to platform_get_irq_optional() 2019-12-17 19:55:51 +01:00
tpm_tis_core.c tpm_tis: extra chip->ops check on error path in tpm_tis_core_init 2020-07-22 09:32:53 +02:00
tpm_tis_core.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_tis_spi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpm_vtpm_proxy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
tpmrm-dev.c tpm: Unify the mismatching TPM space buffer sizes 2020-08-19 08:16:27 +02:00
xen-tpmfront.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00