lkml.org 
[lkml]   [2022]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] x86/alternative: fix undefined reference to __ibt_endbr_seal[_end]
Date
On Tue, Oct 11 2022 at 19:38, Miaohe Lin wrote:
> Due to the explicit 'noinline' GCC-7.3 is not able to optimize away the
> argument setup of:
>
> apply_ibt_endbr(__ibt_endbr_seal, __ibt_enbr_seal_end);
>
> even when X86_KERNEL_IBT=n and the function is an empty stub which leads
> to link errors due to missing __ibt_endbr_seal* symbols like below:
>
> ld: arch/x86/kernel/alternative.o: in function
> `alternative_instructions':
> alternative.c:(.init.text+0x15d): undefined reference to
> `__ibt_endbr_seal_end'
> ld: alternative.c:(.init.text+0x164): undefined reference to
> `__ibt_endbr_seal'

This is incomplete because the noinline is only visible within
alternative.c, but there is another caller in module.c

This needs an inline stub in the header to be correct.

Thanks,

tglx

\
 
 \ /
  Last update: 2022-12-02 13:00    [W:0.079 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site