efi/tpm: fix section mismatch warning
Subsystems (3)
PATCH 1/1 efi/tpm: fix section mismatch warning
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.
--- drivers/firmware/efi/tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/tpm.c +1 -1
@@ -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 ;
Signature · 1 line
2.26.0
Quoted 8 lines · Arnd Bergmann
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 functiontpm2_calc_event_log_size()to the function .init.text:early_memunmap() The functiontpm2_calc_event_log_size()references
the function__initearly_memunmap().
This is often becausetpm2_calc_event_log_sizelacks a__init
annotation or the annotation ofearly_memunmapis wrong.
Quoted 7 lines
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 <[email protected]>--- drivers/firmware/efi/tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Jason
Ard Biesheuvel
maintainerQuoted 9 lines · Arnd Bergmann
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 functiontpm2_calc_event_log_size()to the function .init.text:early_memunmap() The functiontpm2_calc_event_log_size()references
the function__initearly_memunmap().
This is often becausetpm2_calc_event_log_sizelacks a__init
annotation or the annotation ofearly_memunmapis wrong.
Quoted 4 lines
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 <[email protected]>
Thanks, I'll take it as a fix.
Quoted 20 lines
--- drivers/firmware/efi/tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/firmware/efi/tpm.c +1
-2@@ -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
Quoted 8 lines · Arnd Bergmann
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 functiontpm2_calc_event_log_size()to the function .init.text:early_memunmap() The functiontpm2_calc_event_log_size()references
the function__initearly_memunmap().
This is often becausetpm2_calc_event_log_sizelacks a__init
annotation or the annotation ofearly_memunmapis wrong.
Quoted 4 lines
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 <[email protected]>
/Jarkko
Quoted 8 lines · Arnd Bergmann
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 functiontpm2_calc_event_log_size()to the function .init.text:early_memunmap() The functiontpm2_calc_event_log_size()references
the function__initearly_memunmap().
This is often becausetpm2_calc_event_log_sizelacks a__init
annotation or the annotation ofearly_memunmapis wrong.
Quoted 4 lines
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 <[email protected]>
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
Quoted 20 lines
---
drivers/firmware/efi/tpm.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/firmware/efi/tpm.c +1
-1@@ -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 ;Signature · 1 line
2.26.0
Quoted 10 lines · Jerry Snitselaar
Quoted 8 lines · Arnd Bergmann
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 functiontpm2_calc_event_log_size()to the function .init.text:early_memunmap() The functiontpm2_calc_event_log_size()references
the function__initearly_memunmap().
This is often becausetpm2_calc_event_log_sizelacks a__init
annotation or the annotation ofearly_memunmapis wrong.
Quoted 7 lines
Quoted 4 lines
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 <[email protected]>Minor thing, but should the Fixes be
c46f3405692d("tpm: Reserve the TPM final events table")? Or what am I missing aboute658c82be556that 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
Ard Biesheuvel
maintainerQuoted 14 lines · Arnd Bergmann
Quoted 12 lines · Jerry Snitselaar
Quoted 10 lines · Arnd Bergmann
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 functiontpm2_calc_event_log_size()to the function .init.text:early_memunmap() The functiontpm2_calc_event_log_size()references
the function__initearly_memunmap().
This is often becausetpm2_calc_event_log_sizelacks a__init
annotation or the annotation ofearly_memunmapis wrong.Add the missing annotation.
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
Fixes e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")Signed-off-by Arnd Bergmann <[email protected]>Minor thing, but should the Fixes be
c46f3405692d("tpm: Reserve the TPM final events table")? Or what am I missing aboute658c82be556that 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.
Jerry Snitselaar
Reviewed-byQuoted 18 lines · Ard Biesheuvel
Quoted 17 lines · Arnd Bergmann
Quoted 15 lines · Jerry Snitselaar
Quoted 12 lines · Arnd Bergmann
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 functiontpm2_calc_event_log_size()to the function .init.text:early_memunmap() The functiontpm2_calc_event_log_size()references
the function__initearly_memunmap().
This is often becausetpm2_calc_event_log_sizelacks a__init
annotation or the annotation ofearly_memunmapis 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 <[email protected]>
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
Minor thing, but should the Fixes be
c46f3405692d("tpm: Reserve the TPM final events table")? Or what am I missing aboute658c82be556that 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: