Re: [RFC PATCH v2 1/6] fprobe: Use fprobe_regs in fprobe entry handler

From: Steven Rostedt
Date: Fri Aug 11 2023 - 13:10:53 EST


On Thu, 10 Aug 2023 07:13:30 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:

> >
> > I hope that makes my thoughts clearer? It's a hairy topic ahah
>
> Ah, I see your point.
>
> static void fprobe_init(struct fprobe *fp)
> {
> fp->nmissed = 0;
> if (fprobe_shared_with_kprobes(fp))
> fp->ops.func = fprobe_kprobe_handler;
> else
> fp->ops.func = fprobe_handler;
> fp->ops.flags |= FTRACE_OPS_FL_SAVE_REGS; <---- This flag!
> }
>
> So it should be FTRACE_OPS_FL_ARGS. Let me fix that.

Yes, this was the concern that I was bringing up, where I did not see an
advantage of fprobes over kprobes using ftrace, because they both were
saving all registers.

-- Steve