mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 17:41:22 +00:00
047d4226b0
When rngd is run as root then lots of these types of message will appear
in the kernel log if the TPM has been configured to provide random bytes:
[ 7406.275163] tpm tpm0: tpm_transmit: tpm_recv: error -4
The issue is caused by the following call that is interrupted while
waiting for the TPM's response.
sig = wait_event_interruptible(ibmvtpm->wq, !ibmvtpm->tpm_processing_cmd);
Rather than waiting for the response in the low level driver, have it use
the polling loop in tpm_try_transmit() that uses a command's duration to
poll until a result has been returned by the TPM, thus ending when the
timeout has occurred but not responding to signals and ctrl-c anymore. To
stay in this polling loop extend tpm_ibmvtpm_status() to return
'true' for as long as the vTPM is indicated as being busy in
tpm_processing_cmd. Since the loop requires the TPM's timeouts, get them
now using tpm_get_timeouts() after setting the TPM2 version flag on the
chip.
To recreat the resolved issue start rngd like this:
sudo rngd -r /dev/hwrng -t
sudo rngd -r /dev/tpm0 -t
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1981473
Fixes:
|
||
---|---|---|
.. | ||
eventlog | ||
st33zp24 | ||
Kconfig | ||
Makefile | ||
tpm1-cmd.c | ||
tpm2-cmd.c | ||
tpm2-space.c | ||
tpm_atmel.c | ||
tpm_atmel.h | ||
tpm_crb.c | ||
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.h | ||
tpm_infineon.c | ||
tpm_nsc.c | ||
tpm_ppi.c | ||
tpm_tis_core.c | ||
tpm_tis_core.h | ||
tpm_tis_i2c_cr50.c | ||
tpm_tis_spi_cr50.c | ||
tpm_tis_spi_main.c | ||
tpm_tis_spi.h | ||
tpm_tis_synquacer.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 |