* [PATCH] efi/tpm: fix section mismatch warning
@ 2020-04-29 19:01 Arnd Bergmann
2020-04-29 19:15 ` Jason Gunthorpe
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Arnd Bergmann @ 2020-04-29 19:01 UTC (permalink / raw)
To: Ard Biesheuvel, Ingo Molnar, Jerry Snitselaar
Cc: Arnd Bergmann, Ard Biesheuvel, Ben Dooks, Dave Young,
Jarkko Sakkinen, Lukas Wunner, Lyude Paul, Matthew Garrett,
Octavian Purdila, Peter Jones, Peter Zijlstra, Scott Talbert,
Thomas Gleixner, linux-efi, linux-integrity, stable,
linux-kernel
Building with gcc-10 causes a harmless warning about a section mismatch:
WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
The function tpm2_calc_event_log_size() references
the function __init early_memunmap().
This is often because tpm2_calc_event_log_size lacks a __init
annotation or the annotation of early_memunmap is wrong.
Add the missing annotation.
Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/firmware/efi/tpm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c
index 31f9f0e369b9..55b031d2c989 100644
--- a/drivers/firmware/efi/tpm.c
+++ b/drivers/firmware/efi/tpm.c
@@ -16,7 +16,7 @@
int efi_tpm_final_log_size;
EXPORT_SYMBOL(efi_tpm_final_log_size);
-static int tpm2_calc_event_log_size(void *data, int count, void *size_info)
+static int __init tpm2_calc_event_log_size(void *data, int count, void *size_info)
{
struct tcg_pcr_event2_head *header;
int event_size, size = 0;
--
2.26.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/tpm: fix section mismatch warning
2020-04-29 19:01 [PATCH] efi/tpm: fix section mismatch warning Arnd Bergmann
@ 2020-04-29 19:15 ` Jason Gunthorpe
2020-04-29 19:15 ` Ard Biesheuvel
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Jason Gunthorpe @ 2020-04-29 19:15 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Ard Biesheuvel, Ingo Molnar, Jerry Snitselaar, Ard Biesheuvel,
Ben Dooks, Dave Young, Jarkko Sakkinen, Lukas Wunner, Lyude Paul,
Matthew Garrett, Octavian Purdila, Peter Jones, Peter Zijlstra,
Scott Talbert, Thomas Gleixner, linux-efi, linux-integrity,
stable, linux-kernel
On Wed, Apr 29, 2020 at 09:01:08PM +0200, Arnd Bergmann wrote:
> Building with gcc-10 causes a harmless warning about a section mismatch:
>
> WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
> The function tpm2_calc_event_log_size() references
> the function __init early_memunmap().
> This is often because tpm2_calc_event_log_size lacks a __init
> annotation or the annotation of early_memunmap is wrong.
>
> Add the missing annotation.
>
> Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/firmware/efi/tpm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Jason
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/tpm: fix section mismatch warning
2020-04-29 19:01 [PATCH] efi/tpm: fix section mismatch warning Arnd Bergmann
2020-04-29 19:15 ` Jason Gunthorpe
@ 2020-04-29 19:15 ` Ard Biesheuvel
2020-04-30 4:00 ` Jarkko Sakkinen
2020-04-30 21:15 ` Jerry Snitselaar
3 siblings, 0 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2020-04-29 19:15 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Ingo Molnar, Jerry Snitselaar, Ard Biesheuvel, Ben Dooks,
Dave Young, Jarkko Sakkinen, Lukas Wunner, Lyude Paul,
Matthew Garrett, Octavian Purdila, Peter Jones, Peter Zijlstra,
Scott Talbert, Thomas Gleixner, linux-efi, linux-integrity,
stable, Linux Kernel Mailing List
On Wed, 29 Apr 2020 at 21:02, Arnd Bergmann <arnd@arndb.de> wrote:
>
> Building with gcc-10 causes a harmless warning about a section mismatch:
>
> WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
> The function tpm2_calc_event_log_size() references
> the function __init early_memunmap().
> This is often because tpm2_calc_event_log_size lacks a __init
> annotation or the annotation of early_memunmap is wrong.
>
> Add the missing annotation.
>
> Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, I'll take it as a fix.
> ---
> drivers/firmware/efi/tpm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c
> index 31f9f0e369b9..55b031d2c989 100644
> --- a/drivers/firmware/efi/tpm.c
> +++ b/drivers/firmware/efi/tpm.c
> @@ -16,7 +16,7 @@
> int efi_tpm_final_log_size;
> EXPORT_SYMBOL(efi_tpm_final_log_size);
>
> -static int tpm2_calc_event_log_size(void *data, int count, void *size_info)
> +static int __init tpm2_calc_event_log_size(void *data, int count, void *size_info)
> {
> struct tcg_pcr_event2_head *header;
> int event_size, size = 0;
> --
> 2.26.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/tpm: fix section mismatch warning
2020-04-29 19:01 [PATCH] efi/tpm: fix section mismatch warning Arnd Bergmann
2020-04-29 19:15 ` Jason Gunthorpe
2020-04-29 19:15 ` Ard Biesheuvel
@ 2020-04-30 4:00 ` Jarkko Sakkinen
2020-04-30 21:15 ` Jerry Snitselaar
3 siblings, 0 replies; 8+ messages in thread
From: Jarkko Sakkinen @ 2020-04-30 4:00 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Ard Biesheuvel, Ingo Molnar, Jerry Snitselaar, Ard Biesheuvel,
Ben Dooks, Dave Young, Lukas Wunner, Lyude Paul, Matthew Garrett,
Octavian Purdila, Peter Jones, Peter Zijlstra, Scott Talbert,
Thomas Gleixner, linux-efi, linux-integrity, stable,
linux-kernel
On Wed, Apr 29, 2020 at 09:01:08PM +0200, Arnd Bergmann wrote:
> Building with gcc-10 causes a harmless warning about a section mismatch:
>
> WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
> The function tpm2_calc_event_log_size() references
> the function __init early_memunmap().
> This is often because tpm2_calc_event_log_size lacks a __init
> annotation or the annotation of early_memunmap is wrong.
>
> Add the missing annotation.
>
> Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
/Jarkko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/tpm: fix section mismatch warning
2020-04-29 19:01 [PATCH] efi/tpm: fix section mismatch warning Arnd Bergmann
` (2 preceding siblings ...)
2020-04-30 4:00 ` Jarkko Sakkinen
@ 2020-04-30 21:15 ` Jerry Snitselaar
2020-04-30 21:21 ` Arnd Bergmann
3 siblings, 1 reply; 8+ messages in thread
From: Jerry Snitselaar @ 2020-04-30 21:15 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Ard Biesheuvel, Ingo Molnar, Ard Biesheuvel, Ben Dooks,
Dave Young, Jarkko Sakkinen, Lukas Wunner, Lyude Paul,
Matthew Garrett, Octavian Purdila, Peter Jones, Peter Zijlstra,
Scott Talbert, Thomas Gleixner, linux-efi, linux-integrity,
stable, linux-kernel
On Wed Apr 29 20, Arnd Bergmann wrote:
>Building with gcc-10 causes a harmless warning about a section mismatch:
>
>WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
>The function tpm2_calc_event_log_size() references
>the function __init early_memunmap().
>This is often because tpm2_calc_event_log_size lacks a __init
>annotation or the annotation of early_memunmap is wrong.
>
>Add the missing annotation.
>
>Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
>Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Minor thing, but should the Fixes be c46f3405692d ("tpm: Reserve the TPM final events table")? Or what am I missing
about e658c82be556 that causes this? Just trying to understand what I did. :)
Regards,
Jerry
>---
> drivers/firmware/efi/tpm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c
>index 31f9f0e369b9..55b031d2c989 100644
>--- a/drivers/firmware/efi/tpm.c
>+++ b/drivers/firmware/efi/tpm.c
>@@ -16,7 +16,7 @@
> int efi_tpm_final_log_size;
> EXPORT_SYMBOL(efi_tpm_final_log_size);
>
>-static int tpm2_calc_event_log_size(void *data, int count, void *size_info)
>+static int __init tpm2_calc_event_log_size(void *data, int count, void *size_info)
> {
> struct tcg_pcr_event2_head *header;
> int event_size, size = 0;
>--
>2.26.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/tpm: fix section mismatch warning
2020-04-30 21:15 ` Jerry Snitselaar
@ 2020-04-30 21:21 ` Arnd Bergmann
2020-04-30 21:25 ` Ard Biesheuvel
0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2020-04-30 21:21 UTC (permalink / raw)
To: Jerry Snitselaar, Arnd Bergmann, Ard Biesheuvel, Ingo Molnar,
Ard Biesheuvel, Ben Dooks, Dave Young, Jarkko Sakkinen,
Lukas Wunner, Lyude Paul, Matthew Garrett, Octavian Purdila,
Peter Jones, Peter Zijlstra, Scott Talbert, Thomas Gleixner,
linux-efi, linux-integrity, # 3.4.x, linux-kernel
On Thu, Apr 30, 2020 at 11:15 PM Jerry Snitselaar <jsnitsel@redhat.com> wrote:
>
> On Wed Apr 29 20, Arnd Bergmann wrote:
> >Building with gcc-10 causes a harmless warning about a section mismatch:
> >
> >WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
> >The function tpm2_calc_event_log_size() references
> >the function __init early_memunmap().
> >This is often because tpm2_calc_event_log_size lacks a __init
> >annotation or the annotation of early_memunmap is wrong.
> >
> >Add the missing annotation.
> >
> >Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
> >Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Minor thing, but should the Fixes be c46f3405692d ("tpm: Reserve the TPM final events table")? Or what am I missing
> about e658c82be556 that causes this? Just trying to understand what I did. :)
You are right, I misread the git history. Can you fix it up when applying the
patch, or should I resend it?
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/tpm: fix section mismatch warning
2020-04-30 21:21 ` Arnd Bergmann
@ 2020-04-30 21:25 ` Ard Biesheuvel
2020-04-30 21:32 ` Jerry Snitselaar
0 siblings, 1 reply; 8+ messages in thread
From: Ard Biesheuvel @ 2020-04-30 21:25 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jerry Snitselaar, Ingo Molnar, Ard Biesheuvel, Ben Dooks,
Dave Young, Jarkko Sakkinen, Lukas Wunner, Lyude Paul,
Matthew Garrett, Octavian Purdila, Peter Jones, Peter Zijlstra,
Scott Talbert, Thomas Gleixner, linux-efi, linux-integrity,
# 3.4.x, linux-kernel
On Thu, 30 Apr 2020 at 23:21, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Thu, Apr 30, 2020 at 11:15 PM Jerry Snitselaar <jsnitsel@redhat.com> wrote:
> >
> > On Wed Apr 29 20, Arnd Bergmann wrote:
> > >Building with gcc-10 causes a harmless warning about a section mismatch:
> > >
> > >WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
> > >The function tpm2_calc_event_log_size() references
> > >the function __init early_memunmap().
> > >This is often because tpm2_calc_event_log_size lacks a __init
> > >annotation or the annotation of early_memunmap is wrong.
> > >
> > >Add the missing annotation.
> > >
> > >Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
> > >Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >
> > Minor thing, but should the Fixes be c46f3405692d ("tpm: Reserve the TPM final events table")? Or what am I missing
> > about e658c82be556 that causes this? Just trying to understand what I did. :)
>
> You are right, I misread the git history. Can you fix it up when applying the
> patch, or should I resend it?
>
I can fix it up, no worries.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] efi/tpm: fix section mismatch warning
2020-04-30 21:25 ` Ard Biesheuvel
@ 2020-04-30 21:32 ` Jerry Snitselaar
0 siblings, 0 replies; 8+ messages in thread
From: Jerry Snitselaar @ 2020-04-30 21:32 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Arnd Bergmann, Ingo Molnar, Ard Biesheuvel, Ben Dooks,
Dave Young, Jarkko Sakkinen, Lukas Wunner, Lyude Paul,
Matthew Garrett, Octavian Purdila, Peter Jones, Peter Zijlstra,
Scott Talbert, Thomas Gleixner, linux-efi, linux-integrity,
# 3.4.x, linux-kernel
On Thu Apr 30 20, Ard Biesheuvel wrote:
>On Thu, 30 Apr 2020 at 23:21, Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> On Thu, Apr 30, 2020 at 11:15 PM Jerry Snitselaar <jsnitsel@redhat.com> wrote:
>> >
>> > On Wed Apr 29 20, Arnd Bergmann wrote:
>> > >Building with gcc-10 causes a harmless warning about a section mismatch:
>> > >
>> > >WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
>> > >The function tpm2_calc_event_log_size() references
>> > >the function __init early_memunmap().
>> > >This is often because tpm2_calc_event_log_size lacks a __init
>> > >annotation or the annotation of early_memunmap is wrong.
>> > >
>> > >Add the missing annotation.
>> > >
>> > >Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
>> > >Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> >
>> > Minor thing, but should the Fixes be c46f3405692d ("tpm: Reserve the TPM final events table")? Or what am I missing
>> > about e658c82be556 that causes this? Just trying to understand what I did. :)
>>
>> You are right, I misread the git history. Can you fix it up when applying the
>> patch, or should I resend it?
>>
>
>I can fix it up, no worries.
>
With the fix applied:
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-04-30 21:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 19:01 [PATCH] efi/tpm: fix section mismatch warning Arnd Bergmann
2020-04-29 19:15 ` Jason Gunthorpe
2020-04-29 19:15 ` Ard Biesheuvel
2020-04-30 4:00 ` Jarkko Sakkinen
2020-04-30 21:15 ` Jerry Snitselaar
2020-04-30 21:21 ` Arnd Bergmann
2020-04-30 21:25 ` Ard Biesheuvel
2020-04-30 21:32 ` Jerry Snitselaar
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).