mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
Reads on tpm/tpm0/ppi/*operations can become very long on misconfigured systems. Reading the TPM is a blocking operation, thus a user could effectively trigger a DOS. Resolve this by caching the results and avoiding the blocking operations after the first read. [ jarkko: fixed atomic sleep: sed -i 's/spin_/mutex_/g' drivers/char/tpm/tpm_ppi.c sed -i 's/DEFINE_SPINLOCK/DEFINE_MUTEX/g' drivers/char/tpm/tpm_ppi.c ] Signed-off-by: Denis Aleksandrov <[email protected]> Reported-by: Jan Stancek <[email protected]> Closes: https://lore.kernel.org/linux-integrity/[email protected]/T/#u Suggested-by: Jarkko Sakkinen <[email protected]> Reviewed-by: Paul Menzel <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>