Is efi_tpm_eventlog_init calling memblock_reserve correctly for the TPM final log?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2022-06-22 at 21:26 -0700, Jerry Snitselaar wrote:
> Is this calling memblock_reserve() correctly for the final events
> log?
> 
> For the tpm events log it does:
> 
> memblock_reserve(efi.tpm_log, tbl_size);
> 
> For the final events log it does:
> 
>           memblock_reserve((unsigned long)final_tbl,
>                            tbl_size + sizeof(*final_tbl));
> 
> 
> which ends up with something like:
> 
> [    0.000000] memblock_reserve:
> [0x000000005d7b5018-0x000000005d7b958a]
> efi_tpm_eventlog_init+0x82/0x370
> [    0.000000] memblock_reserve:
> [0xffffffffff2c0000-0xffffffffff2c00e4]
> efi_tpm_eventlog_init+0x324/0x370
> 
> 
> Regards,
> Jerry
> 

Hi Matthew and Jarrko,

Is efi_tpm_eventlog_init() calling memblock_reserve() with the correct
argument for the TPM final log, or should it be the following instead:

diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c
index 8f665678e9e3..e8d69bd548f3 100644
--- a/drivers/firmware/efi/tpm.c
+++ b/drivers/firmware/efi/tpm.c
@@ -97,7 +97,7 @@ int __init efi_tpm_eventlog_init(void)
 		goto out_calc;
 	}
 
-	memblock_reserve((unsigned long)final_tbl,
+	memblock_reserve(efi.tpm_final_log,
 			 tbl_size + sizeof(*final_tbl));
 	efi_tpm_final_log_size = tbl_size;
 







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux