Re: [RFC PATCH v2 0/6] bpf: fprobe: rethook: Use ftrace_regs instead of pt_regs
From: Florent Revest
Date: Tue Aug 08 2023 - 13:32:47 EST
On Mon, Aug 7, 2023 at 8:48 AM Masami Hiramatsu (Google)
<mhiramat@xxxxxxxxxx> wrote:
>
> Florent, feel free to add your rethook for arm64, but please do not remove
> kretprobe trampoline yet. It is another discussion point. We may be possible
> to use ftrace_regs for kretprobe by ftrace_partial_regs() but kretprobe
> allows nest probe. (maybe we can skip that case?)
Ack :)
> arch/Kconfig | 1 +
> arch/arm64/include/asm/ftrace.h | 11 ++++++
> arch/loongarch/Kconfig | 1 +
> arch/s390/Kconfig | 1 +
> arch/x86/Kconfig | 1 +
> arch/x86/kernel/rethook.c | 9 +++--
> include/linux/fprobe.h | 4 +-
> include/linux/ftrace.h | 56 ++++++++++++++++++-----------
> include/linux/rethook.h | 11 +++---
> kernel/kprobes.c | 9 ++++-
> kernel/trace/Kconfig | 9 ++++-
> kernel/trace/bpf_trace.c | 14 +++++--
> kernel/trace/fprobe.c | 8 ++--
> kernel/trace/rethook.c | 16 ++++----
> kernel/trace/trace_fprobe.c | 76 ++++++++++++++++++++++++---------------
> kernel/trace/trace_probe_tmpl.h | 2 +
> lib/test_fprobe.c | 10 +++--
> samples/fprobe/fprobe_example.c | 4 +-
I believe that Documentation/trace/fprobe.rst should also be modified
following the API change