This is a note to let you know that I've just added the patch titled tpm: vtpm_proxy: Avoid reading host log when using a virtual device to the 5.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tpm-vtpm_proxy-avoid-reading-host-log-when-using-a-virtual-device.patch and it can be found in the queue-5.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 9716ac65efc8f780549b03bddf41e60c445d4709 Mon Sep 17 00:00:00 2001 From: Stefan Berger <stefanb@xxxxxxxxxxxxx> Date: Wed, 10 Mar 2021 17:19:16 -0500 Subject: tpm: vtpm_proxy: Avoid reading host log when using a virtual device From: Stefan Berger <stefanb@xxxxxxxxxxxxx> commit 9716ac65efc8f780549b03bddf41e60c445d4709 upstream. Avoid allocating memory and reading the host log when a virtual device is used since this log is of no use to that driver. A virtual device can be identified through the flag TPM_CHIP_FLAG_VIRTUAL, which is only set for the tpm_vtpm_proxy driver. Cc: stable@xxxxxxxxxxxxxxx Fixes: 6f99612e2500 ("tpm: Proxy driver for supporting multiple emulated TPMs") Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxxxxx> Reviewed-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx> Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/char/tpm/eventlog/common.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/char/tpm/eventlog/common.c +++ b/drivers/char/tpm/eventlog/common.c @@ -107,6 +107,9 @@ void tpm_bios_log_setup(struct tpm_chip int log_version; int rc = 0; + if (chip->flags & TPM_CHIP_FLAG_VIRTUAL) + return; + rc = tpm_read_log(chip); if (rc < 0) return; Patches currently in stable-queue which might be from stefanb@xxxxxxxxxxxxx are queue-5.12/tpm-acpi-check-eventlog-signature-before-using-it.patch queue-5.12/tpm-efi-use-local-variable-for-calculating-final-log-size.patch queue-5.12/tpm-vtpm_proxy-avoid-reading-host-log-when-using-a-virtual-device.patch