* efi_tpm_eventlog_init question
@ 2022-06-23 4:26 Jerry Snitselaar
2022-10-07 16:50 ` Is efi_tpm_eventlog_init calling memblock_reserve correctly for the TPM final log? Jerry Snitselaar
0 siblings, 1 reply; 3+ messages in thread
From: Jerry Snitselaar @ 2022-06-23 4:26 UTC (permalink / raw)
To: linux-integrity, Matthew Garrett, Jarkko Sakkinen
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Is efi_tpm_eventlog_init calling memblock_reserve correctly for the TPM final log?
2022-06-23 4:26 efi_tpm_eventlog_init question Jerry Snitselaar
@ 2022-10-07 16:50 ` Jerry Snitselaar
2022-10-12 8:12 ` Jarkko Sakkinen
0 siblings, 1 reply; 3+ messages in thread
From: Jerry Snitselaar @ 2022-10-07 16:50 UTC (permalink / raw)
To: linux-integrity, Matthew Garrett, Jarkko Sakkinen
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;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Is efi_tpm_eventlog_init calling memblock_reserve correctly for the TPM final log?
2022-10-07 16:50 ` Is efi_tpm_eventlog_init calling memblock_reserve correctly for the TPM final log? Jerry Snitselaar
@ 2022-10-12 8:12 ` Jarkko Sakkinen
0 siblings, 0 replies; 3+ messages in thread
From: Jarkko Sakkinen @ 2022-10-12 8:12 UTC (permalink / raw)
To: Jerry Snitselaar; +Cc: linux-integrity, Matthew Garrett
On Fri, Oct 07, 2022 at 09:50:49AM -0700, Jerry Snitselaar wrote:
> 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;
With a *long while* since last looked into this, it does look wrong as
'final_tbl' is just transient thing in the fixmap used internally in the
function.
BR, Jarkko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-12 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-23 4:26 efi_tpm_eventlog_init question Jerry Snitselaar
2022-10-07 16:50 ` Is efi_tpm_eventlog_init calling memblock_reserve correctly for the TPM final log? Jerry Snitselaar
2022-10-12 8:12 ` Jarkko Sakkinen
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).