Re: [PATCH v3 00/22] Move notrace from inline to __always_inline
From: Masami Hiramatsu (Google)
Date: Fri Dec 04 2026 - 10:42:15 EST
On Thu, 3 Dec 2026 20:44:17 -0800, Song Liu <song@xxxxxxxxxx> wrote:
> Hi Masami,
>
> On Thu, Dec 3, 2026 at 6:28 PM Masami Hiramatsu (Google)
> <mhiramat@xxxxxxxxxx> wrote:
[...]
> > On the other hand, if notrace is removed from inline macro without static
> > verification, an un-inlined "inline" helper called from notrace or
> > ftrace pre-recursion paths has no such safeguard. That is why I believe
> > we need compile-time validation (similar to noinstr checks) before
> > changing inline globally.
>
> However, it appears that we are using "inline" as "notrace", which
> seems wrong. IIUC, recursion avoidance is the requirement for the
> tracing subsystem, but "inline means notrace" applies to the whole
> kernel.
>
> Shall we review all the "inline" uses in the tracing subsystem, and
> add "notrace" to functions that cannot be traced. Then, we can
> remove notrace from "inline". Would this work? AFAICT, we may
> or may not need a static analysis tool for this.
Yes, I think that approach should work. In any case, I believe it would
be better to introduce a post-build tool that performs static analysis.
Steve, what do you think?
Thank you,
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>