[PATCH] powerpc64/ftrace: Fix ftrace for clang builds

Ondrej Mosnáček omosnacek at gmail.com
Wed Aug 10 02:59:24 AEST 2022


On Tue, Aug 9, 2022 at 11:59 AM Naveen N. Rao
<naveen.n.rao at linux.vnet.ibm.com> wrote:
> Clang doesn't support -mprofile-kernel ABI, so guard the checks against
> CONFIG_DYNAMIC_FTRACE_WITH_REGS, rather than the elf ABI version.
>
> Fixes: 23b44fc248f420 ("powerpc/ftrace: Make __ftrace_make_{nop/call}() common to PPC32 and PPC64")
> Reported-by: Nick Desaulniers <ndesaulniers at google.com>
> Reported-by: Ondrej Mosnacek <omosnacek at gmail.com>
> Signed-off-by: Naveen N. Rao <naveen.n.rao at linux.vnet.ibm.com>
> ---
>  arch/powerpc/kernel/trace/ftrace.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

With this patch my reproducer [1] is passing, thanks!

Tested-by: Ondrej Mosnacek <omosnacek at gmail.com>

[1] https://github.com/ClangBuiltLinux/linux/issues/1682#issue-1330483247


More information about the Linuxppc-dev mailing list