Re: [PATCH 5.15] of: kexec: Mark ima_{free,stable}_kexec_buffer() as __init

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

 



On Tue, 05 Sep 2023 13:36:11 -0700, Nathan Chancellor wrote:
> This commit has no direct upstream equivalent.
> 
> After commit d48016d74836 ("mm,ima,kexec,of: use memblock_free_late from
> ima_free_kexec_buffer") in 5.15, there is a modpost warning for certain
> configurations:
> 
>   WARNING: modpost: vmlinux.o(.text+0xb14064): Section mismatch in reference from the function ima_free_kexec_buffer() to the function .init.text:__memblock_free_late()
>   The function ima_free_kexec_buffer() references
>   the function __init __memblock_free_late().
>   This is often because ima_free_kexec_buffer lacks a __init
>   annotation or the annotation of __memblock_free_late is wrong.
> 
> In mainline, there is no issue because ima_free_kexec_buffer() is marked
> as __init, which was done as part of commit b69a2afd5afc ("x86/kexec:
> Carry forward IMA measurement log on kexec") in 6.0, which is not
> suitable for stable.
> 
> Mark ima_free_kexec_buffer() and its single caller
> ima_load_kexec_buffer() as __init in 5.15, as ima_load_kexec_buffer() is
> only called from ima_init(), which is __init, clearing up the warning.
> 
> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
> ---
>  drivers/of/kexec.c                 | 2 +-
>  include/linux/of.h                 | 2 +-
>  security/integrity/ima/ima.h       | 2 +-
>  security/integrity/ima/ima_kexec.c | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 

Acked-by: Rob Herring <robh@xxxxxxxxxx>




[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