LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [tip: efi/urgent] efi/tpm: Differentiate missing and invalid final event log table.
@ 2021-07-20 11:37 tip-bot2 for Michal Suchanek
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Michal Suchanek @ 2021-07-20 11:37 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Michal Suchanek, Jarkko Sakkinen, Ard Biesheuvel, x86, linux-kernel

The following commit has been merged into the efi/urgent branch of tip:

Commit-ID:     674a9f1f6815849bfb5bf385e7da8fc198aaaba9
Gitweb:        https://git.kernel.org/tip/674a9f1f6815849bfb5bf385e7da8fc198aaaba9
Author:        Michal Suchanek <msuchanek@suse.de>
AuthorDate:    Thu, 08 Jul 2021 11:46:54 +02:00
Committer:     Ard Biesheuvel <ardb@kernel.org>
CommitterDate: Fri, 16 Jul 2021 18:04:55 +02:00

efi/tpm: Differentiate missing and invalid final event log table.

Missing TPM final event log table is not a firmware bug.

Clearly if providing event log in the old format makes the final event
log invalid it should not be provided at least in that case.

Fixes: b4f1874c6216 ("tpm: check event log version before reading final events")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 drivers/firmware/efi/tpm.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c
index c1955d3..8f66567 100644
--- a/drivers/firmware/efi/tpm.c
+++ b/drivers/firmware/efi/tpm.c
@@ -62,9 +62,11 @@ int __init efi_tpm_eventlog_init(void)
 	tbl_size = sizeof(*log_tbl) + log_tbl->size;
 	memblock_reserve(efi.tpm_log, tbl_size);
 
-	if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR ||
-	    log_tbl->version != EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) {
-		pr_warn(FW_BUG "TPM Final Events table missing or invalid\n");
+	if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR) {
+		pr_info("TPM Final Events table not present\n");
+		goto out;
+	} else if (log_tbl->version != EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) {
+		pr_warn(FW_BUG "TPM Final Events table invalid\n");
 		goto out;
 	}
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-20 11:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20 11:37 [tip: efi/urgent] efi/tpm: Differentiate missing and invalid final event log table tip-bot2 for Michal Suchanek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).