mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 10:01:43 +00:00
e2fb992d82
TPM2 can return TPM2_RC_RETRY to any command and when it does we get unexpected failures inside the kernel that surprise users (this is mostly observed in the trusted key handling code). The UEFI 2.6 spec has advice on how to handle this: The firmware SHALL not return TPM2_RC_RETRY prior to the completion of the call to ExitBootServices(). Implementer’s Note: the implementation of this function should check the return value in the TPM response and, if it is TPM2_RC_RETRY, resend the command. The implementation may abort if a sufficient number of retries has been done. So we follow that advice in our tpm_transmit() code using TPM2_DURATION_SHORT as the initial wait duration and TPM2_DURATION_LONG as the maximum wait time. This should fix all the in-kernel use cases and also means that user space TSS implementations don't have to have their own retry handling. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: stable@vger.kernel.org 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> |
||
---|---|---|
.. | ||
st33zp24 | ||
Kconfig | ||
Makefile | ||
tpm1_eventlog.c | ||
tpm2_eventlog.c | ||
tpm2-cmd.c | ||
tpm2-space.c | ||
tpm_atmel.c | ||
tpm_atmel.h | ||
tpm_crb.c | ||
tpm_eventlog_acpi.c | ||
tpm_eventlog_efi.c | ||
tpm_eventlog_of.c | ||
tpm_i2c_atmel.c | ||
tpm_i2c_infineon.c | ||
tpm_i2c_nuvoton.c | ||
tpm_ibmvtpm.c | ||
tpm_ibmvtpm.h | ||
tpm_infineon.c | ||
tpm_nsc.c | ||
tpm_ppi.c | ||
tpm_tis_core.c | ||
tpm_tis_core.h | ||
tpm_tis_spi.c | ||
tpm_tis.c | ||
tpm_vtpm_proxy.c | ||
tpm-chip.c | ||
tpm-dev-common.c | ||
tpm-dev.c | ||
tpm-dev.h | ||
tpm-interface.c | ||
tpm-sysfs.c | ||
tpm.h | ||
tpmrm-dev.c | ||
xen-tpmfront.c |