Skip to content

Commit 674a9f1

Browse files
hramrachardbiesheuvel
authored andcommitted
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: b4f1874 ("tpm: check event log version before reading final events") Signed-off-by: Michal Suchanek <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent e73f0f0 commit 674a9f1

File tree

1 file changed

+5
-3
lines changed
  • drivers/firmware/efi

1 file changed

+5
-3
lines changed

drivers/firmware/efi/tpm.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ int __init efi_tpm_eventlog_init(void)
6262
tbl_size = sizeof(*log_tbl) + log_tbl->size;
6363
memblock_reserve(efi.tpm_log, tbl_size);
6464

65-
if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR ||
66-
log_tbl->version != EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) {
67-
pr_warn(FW_BUG "TPM Final Events table missing or invalid\n");
65+
if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR) {
66+
pr_info("TPM Final Events table not present\n");
67+
goto out;
68+
} else if (log_tbl->version != EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) {
69+
pr_warn(FW_BUG "TPM Final Events table invalid\n");
6870
goto out;
6971
}
7072

0 commit comments

Comments
 (0)