• Arnd Bergmann's avatar
    x86/calldepth: Fix incorrect init section references · ade8c208
    Arnd Bergmann authored
    The addition of callthunks_translate_call_dest means that
    skip_addr() and patch_dest() can no longer be discarded
    as part of the __init section freeing:
    
    WARNING: modpost: vmlinux.o: section mismatch in reference: callthunks_translate_call_dest.cold (section: .text.unlikely) -> skip_addr (section: .init.text)
    WARNING: modpost: vmlinux.o: section mismatch in reference: callthunks_translate_call_dest.cold (section: .text.unlikely) -> patch_dest (section: .init.text)
    WARNING: modpost: vmlinux.o: section mismatch in reference: is_callthunk.cold (section: .text.unlikely) -> skip_addr (section: .init.text)
    ERROR: modpost: Section mismatches detected.
    Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.
    
    Fixes: b2e9dfe5
    
     ("x86/bpf: Emit call depth accounting if required")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/20221215164334.968863-1-arnd@kernel.org
    ade8c208
callthunks.c 8.64 KB