* [PATCH] EFI/stub: tpm: enable tpm eventlog function for ARM64 platform
@ 2019-11-05 8:29 Xinwei Kong
2019-11-06 14:56 ` Ard Biesheuvel
0 siblings, 1 reply; 4+ messages in thread
From: Xinwei Kong @ 2019-11-05 8:29 UTC (permalink / raw)
To: ard.biesheuvel, mingo, will, kstewart, tglx, steve.capper,
linux-efi, linux-kernel
Cc: linuxarm, zoucao, kong.kongxinwei
this patch gets tpm eventlog information such as device boot status,event guid
and so on, which will be from bios stage. it use "efi_retrieve_tpm2_eventlog"
functions to get it for ARM64 platorm.
Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Signed-off-by: Zou Cao <zoucao@linux.alibaba.com>
---
drivers/firmware/efi/libstub/arm-stub.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c
index c382a48..37c8f81 100644
--- a/drivers/firmware/efi/libstub/arm-stub.c
+++ b/drivers/firmware/efi/libstub/arm-stub.c
@@ -139,6 +139,8 @@ unsigned long efi_entry(void *handle, efi_system_table_t *sys_table,
if (status != EFI_SUCCESS)
goto fail;
+ efi_retrieve_tpm2_eventlog(sys_table);
+
/*
* Get a handle to the loaded image protocol. This is used to get
* information about the running image, such as size and the command
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] EFI/stub: tpm: enable tpm eventlog function for ARM64 platform
2019-11-05 8:29 [PATCH] EFI/stub: tpm: enable tpm eventlog function for ARM64 platform Xinwei Kong
@ 2019-11-06 14:56 ` Ard Biesheuvel
2019-11-06 14:59 ` Ard Biesheuvel
0 siblings, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2019-11-06 14:56 UTC (permalink / raw)
To: Xinwei Kong
Cc: Ingo Molnar, Will Deacon, Kate Stewart, Thomas Gleixner,
Steve Capper, linux-efi, Linux Kernel Mailing List, Linuxarm,
zoucao
On Tue, 5 Nov 2019 at 09:29, Xinwei Kong <kong.kongxinwei@hisilicon.com> wrote:
>
> this patch gets tpm eventlog information such as device boot status,event guid
> and so on, which will be from bios stage. it use "efi_retrieve_tpm2_eventlog"
> functions to get it for ARM64 platorm.
>
> Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com>
> Signed-off-by: Zou Cao <zoucao@linux.alibaba.com>
> ---
> drivers/firmware/efi/libstub/arm-stub.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c
> index c382a48..37c8f81 100644
> --- a/drivers/firmware/efi/libstub/arm-stub.c
> +++ b/drivers/firmware/efi/libstub/arm-stub.c
> @@ -139,6 +139,8 @@ unsigned long efi_entry(void *handle, efi_system_table_t *sys_table,
> if (status != EFI_SUCCESS)
> goto fail;
>
> + efi_retrieve_tpm2_eventlog(sys_table);
> +
This function allocates memory, so calling it should be deferred until
after we relocate the kernel, to prevent these allocations from using
up space that we'd rather use for the kernel.
Does it work for you if we move this call further down, right before
the call to efi_enable_reset_attack_mitigation()? Please confirm.
> /*
> * Get a handle to the loaded image protocol. This is used to get
> * information about the running image, such as size and the command
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] EFI/stub: tpm: enable tpm eventlog function for ARM64 platform
2019-11-06 14:56 ` Ard Biesheuvel
@ 2019-11-06 14:59 ` Ard Biesheuvel
2019-11-07 8:03 ` kongxinwei
0 siblings, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2019-11-06 14:59 UTC (permalink / raw)
To: Xinwei Kong
Cc: Ingo Molnar, Will Deacon, Kate Stewart, Thomas Gleixner,
Steve Capper, linux-efi, Linux Kernel Mailing List, Linuxarm,
zoucao
On Wed, 6 Nov 2019 at 15:56, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> On Tue, 5 Nov 2019 at 09:29, Xinwei Kong <kong.kongxinwei@hisilicon.com> wrote:
> >
> > this patch gets tpm eventlog information such as device boot status,event guid
> > and so on, which will be from bios stage. it use "efi_retrieve_tpm2_eventlog"
> > functions to get it for ARM64 platorm.
> >
> > Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com>
> > Signed-off-by: Zou Cao <zoucao@linux.alibaba.com>
> > ---
> > drivers/firmware/efi/libstub/arm-stub.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c
> > index c382a48..37c8f81 100644
> > --- a/drivers/firmware/efi/libstub/arm-stub.c
> > +++ b/drivers/firmware/efi/libstub/arm-stub.c
> > @@ -139,6 +139,8 @@ unsigned long efi_entry(void *handle, efi_system_table_t *sys_table,
> > if (status != EFI_SUCCESS)
> > goto fail;
> >
> > + efi_retrieve_tpm2_eventlog(sys_table);
> > +
>
> This function allocates memory, so calling it should be deferred until
> after we relocate the kernel, to prevent these allocations from using
> up space that we'd rather use for the kernel.
>
> Does it work for you if we move this call further down, right before
> the call to efi_enable_reset_attack_mitigation()? Please confirm.
>
Also, your S-o-b chain is incorrect. If Zou Cao provided you with the
patch, please credit her/him as the author (using git --reset-author)
and move your S-o-b last. If Zou Cao was a co-author [which seems
unlikely for a single line patch], use Co-developed-by+Signed-off-by.
In any case, the S-o-b of the person sending out the patch via email
should come last.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] EFI/stub: tpm: enable tpm eventlog function for ARM64 platform
2019-11-06 14:59 ` Ard Biesheuvel
@ 2019-11-07 8:03 ` kongxinwei
0 siblings, 0 replies; 4+ messages in thread
From: kongxinwei @ 2019-11-07 8:03 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Ingo Molnar, Will Deacon, Kate Stewart, Thomas Gleixner,
Steve Capper, linux-efi, Linux Kernel Mailing List, Linuxarm,
zoucao, Xinwei Kong
On 2019/11/6 22:59, Ard Biesheuvel wrote:
> On Wed, 6 Nov 2019 at 15:56, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>>
>> On Tue, 5 Nov 2019 at 09:29, Xinwei Kong <kong.kongxinwei@hisilicon.com> wrote:
>>>
>>> this patch gets tpm eventlog information such as device boot status,event guid
>>> and so on, which will be from bios stage. it use "efi_retrieve_tpm2_eventlog"
>>> functions to get it for ARM64 platorm.
>>>
>>> Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com>
>>> Signed-off-by: Zou Cao <zoucao@linux.alibaba.com>
>>> ---
>>> drivers/firmware/efi/libstub/arm-stub.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c
>>> index c382a48..37c8f81 100644
>>> --- a/drivers/firmware/efi/libstub/arm-stub.c
>>> +++ b/drivers/firmware/efi/libstub/arm-stub.c
>>> @@ -139,6 +139,8 @@ unsigned long efi_entry(void *handle, efi_system_table_t *sys_table,
>>> if (status != EFI_SUCCESS)
>>> goto fail;
>>>
>>> + efi_retrieve_tpm2_eventlog(sys_table);
>>> +
>>
>> This function allocates memory, so calling it should be deferred until
>> after we relocate the kernel, to prevent these allocations from using
>> up space that we'd rather use for the kernel.
>>
>> Does it work for you if we move this call further down, right before
>> the call to efi_enable_reset_attack_mitigation()? Please confirm.
>>
ok,I will confirm it and send V2 version patch :
>
> Also, your S-o-b chain is incorrect. If Zou Cao provided you with the
> patch, please credit her/him as the author (using git --reset-author)
> and move your S-o-b last. If Zou Cao was a co-author [which seems
> unlikely for a single line patch], use Co-developed-by+Signed-off-by.
> In any case, the S-o-b of the person sending out the patch via email
> should come last.
>
I will deal it.
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-07 8:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 8:29 [PATCH] EFI/stub: tpm: enable tpm eventlog function for ARM64 platform Xinwei Kong
2019-11-06 14:56 ` Ard Biesheuvel
2019-11-06 14:59 ` Ard Biesheuvel
2019-11-07 8:03 ` kongxinwei
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).