tpm: acpi: Check eventlog signature before using it
authorStefan Berger <stefanb@linux.ibm.com>
Wed, 10 Mar 2021 22:19:15 +0000 (17:19 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 May 2021 12:47:12 +0000 (14:47 +0200)
commit58a762a7f3be4a70ad318dd62683b267f453c62a
tree17dbecc975cb5ac540b33e07ca3ad2e70fa2aade
parent3b8b6399666a29daa30b0bb3f5c9e3fc81c5a6a6
tpm: acpi: Check eventlog signature before using it

commit 3dcd15665aca80197333500a4be3900948afccc1 upstream.

Check the eventlog signature before using it. This avoids using an
empty log, as may be the case when QEMU created the ACPI tables,
rather than probing the EFI log next. This resolves an issue where
the EFI log was empty since an empty ACPI log was used.

Cc: stable@vger.kernel.org
Fixes: 85467f63a05c ("tpm: Add support for event log pointer found in TPM2 ACPI table")
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/eventlog/acpi.c