Re: [PATCH 04/15] static_call: Use global functions for the self-test

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 23:37, Thomas Gleixner wrote: > On Fri, Apr 16 2021 at 13:38, Sami Tolvanen wrote: >> #ifdef CONFIG_STATIC_CALL_SELFTEST >> >> -static int func_a(int x) >> +int func_a(int x) >> { >> return x+1; >> } >> >> -static int func_b(int x) >> +int func_b(int x) >> { >>

Re: [PATCH 04/15] static_call: Use global functions for the self-test

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 13:38, Sami Tolvanen wrote: > With CONFIG_CFI_CLANG, the compiler renames static functions. This > breaks static_call users using static functions, because the current > implementation assumes functions have stable names by hardcoding them > in inline assembly. Make the self

[PATCH 04/15] static_call: Use global functions for the self-test

2021-04-16 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler renames static functions. This breaks static_call users using static functions, because the current implementation assumes functions have stable names by hardcoding them in inline assembly. Make the self-test functions global to prevent the compiler from renaming