Re: [PATCH -fixes] riscv: Fix ftrace syscall handling which are now prefixed with __riscv_

From: Björn Töpel
Date: Wed Oct 04 2023 - 01:56:01 EST


Alexandre Ghiti <alexghiti@xxxxxxxxxxxx> writes:

> ftrace creates entries for each syscall in the tracefs but has failed
> since commit 08d0ce30e0e4 ("riscv: Implement syscall wrappers") which
> prefixes all riscv syscalls with __riscv_.
>
> So fix this by implementing arch_syscall_match_sym_name() which allows us
> to ignore this prefix.
>
> And also ignore compat syscalls like x86/arm64 by implementing
> arch_trace_is_compat_syscall().
>
> Fixes: 08d0ce30e0e4 ("riscv: Implement syscall wrappers")
> Signed-off-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>

This fix does the BPF test suite happier!

Tested-by: Björn Töpel <bjorn@xxxxxxxxxxxx>