Re: [PATCH v3] tracepoint: Fix CFI failures with tp_sub_func
From: Google
Date: Sat Apr 08 2023 - 10:05:06 EST
On Tue, 4 Apr 2023 16:22:41 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> On Tue, 4 Apr 2023 11:59:26 +0100
> Mark Rutland <mark.rutland@xxxxxxx> wrote:
>
> > Sorry to ping, but are you planning to pick this up, and/or did you want this
> > resent with the Testing-by typo fixed?
> >
> > I couldn't spot it in the tracing tree, and I'm not sure if it's still on your
> > TODO list for review or has just been missed.
>
> Actually, we may be going back to your original patches, as having a stub
> function for every trace event will allow us to attach fprobes to them. And
> we actually have a need to do that (connecting to tracepoints to get more
> info than the trace event gives).
>
> Masami is currently working on this.
I think we need another stub function similar to the original patch, because
the __tracestub_* functions are usually not called back. Even if I enabled
the static key to enable the stub callback, if user sets another callback
handler to the tracepoint (e.g. enable trace event on it), the __tracestub_*
function is not called anymore.
Thus I think we just pick this version and add another patch to introduce
__probestub_* functions in macro, and fprobe on it. This new stub function is
something like the original one so that it doesn't break CFI. And it will be
registered to tracepoint when the new fprobe based dynamic event is enabled.
Thank you,
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>