Skip to contentSkip to conversation

efi/tpm: return -EINVAL when determining tpm final events log size fails

PATCH In review Jerry Snitselaar 2 participants 2 messages Oct 14, 2019 – Oct 16, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi/tpm: return -EINVAL when determining tpm final events log size fails

Currently nothing checks the return value of efi_tpm_eventlog_init, but in case that changes in the future make sure an error is returned when it fails to determine the tpm final events log size.

Cc Ard Biesheuvel <[email protected]>
Cc Jarkko Sakkinen <[email protected]>
Fixes e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
---
 drivers/firmware/efi/tpm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/firmware/efi/tpm.c +1 -0
index ebd7977653a8..31f9f0e369b9 100644
@@ -88,6 +88,7 @@ int __init efi_tpm_eventlog_init(void)
 
 	if (tbl_size < 0) {
 		pr_err(FW_BUG "Failed to parse event in TPM Final Events Log\n");
+		ret = -EINVAL;
 		goto out_calc;
 	}
 
Signature · 1 line
2.23.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jerry Snitselaar

Currently nothing checks the return value of efi_tpm_eventlog_init, but in case that changes in the future make sure an error is returned when it fails to determine the tpm final events log size.

Quoted 7 lines
Cc Ard Biesheuvel <[email protected]>
Cc Jarkko Sakkinen <[email protected]>
Fixes e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")

/Jarkko