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
Kconfig
Makefile
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
tpm-dev.h
tpm-interface.c tpm: fix wrong return value in tpm_pcr_extend 2020-04-29 16:33:16 +02:00
tpm-sysfs.c
tpm.h tpm: Unify the mismatching TPM space buffer sizes 2020-08-19 08:16:27 +02:00
tpm1-cmd.c
tpm2-cmd.c
tpm2-space.c tpm: Unify the mismatching TPM space buffer sizes 2020-08-19 08:16:27 +02:00
tpm_atmel.c
tpm_atmel.h
tpm_crb.c tpm_crb: fix fTPM on AMD Zen+ CPUs 2020-10-01 13:17:17 +02:00
tpm_ftpm_tee.c
tpm_ftpm_tee.h
tpm_i2c_atmel.c
tpm_i2c_infineon.c
tpm_i2c_nuvoton.c
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
tpm_nsc.c
tpm_ppi.c
tpm_tis.c
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
tpm_tis_spi.c
tpm_vtpm_proxy.c
tpmrm-dev.c tpm: Unify the mismatching TPM space buffer sizes 2020-08-19 08:16:27 +02:00
xen-tpmfront.c