From: Steven Rostedt <rostedt@goodmis.org>
To: Song Liu <song@kernel.org>
Cc: sashiko-reviews@lists.linux.dev,
linux-trace-kernel@vger.kernel.org,
live-patching@vger.kernel.org, mhiramat@kernel.org,
mark.rutland@arm.com, kernel-team@meta.com
Subject: Re: [PATCH] compiler_types: Do not mark inline functions notrace
Date: Thu, 22 Oct 2026 09:25:26 -0400 [thread overview]
Message-ID: <20261022092526.46261360@gandalf.local.home> (raw)
In-Reply-To: <CAPhsuW5BhxAUC=OE=mjZ32vtYpsGM2WYw6bKTXF5GrTDh8CiSA@mail.gmail.com>
On Wed, 21 Oct 2026 16:38:03 -0700
Song Liu <song@kernel.org> wrote:
> On Wed, Oct 21, 2026 at 4:09 PM <sashiko-bot@kernel.org> wrote:
> >
> > Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider:
> > - [Critical] x86/paravirt: removing notrace from inline instruments pv_ops and resume
> > - [High] tracing: removing notrace from inline breaks ftrace recursion protection
> > - [High] rcu: srcu_read_lock_fast_notrace() and tracepoints lose notrace attribute
> > - [High] bpf: removing notrace from inline exposes trampoline helpers to fentry
> > - [High] entry: removing notrace from inline instruments unvalidated entry helpers
>
> Wow. I didn't expect this from Sashiko.
Yeah, I was pretty impressed too.
>
> > --
> >
> > commit 1eb6626c4a5ab70e5858a8a8f1c9edfca235db57
> > Author: Song Liu <song@kernel.org>
> >
> > compiler_types: Do not mark inline functions notrace
> >
> > This commit removes the notrace attribute from the inline macro definition
> > in include/linux/compiler_types.h so that inline functions emitted
> > out-of-line by the compiler can be traced by ftrace, attached to via BPF
> > fentry/fexit, and livepatched.
> >
> > > diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
> > > index c5921f1390079..ea7f2a928b4da 100644
> > > --- a/include/linux/compiler_types.h
> > > +++ b/include/linux/compiler_types.h
> > > @@ -230,9 +230,8 @@ struct ftrace_likely_data {
> > > * externally visible function. This makes extern inline behave as per gnu89
> > > * semantics rather than c99. This prevents multiple symbol definition errors
> > > * of extern inline functions at link time.
> > > - * A lot of inline functions can cause havoc with function tracing.
> > > */
> > > -#define inline inline __gnu_inline __inline_maybe_unused notrace
> > > +#define inline inline __gnu_inline __inline_maybe_unused
> > >
> > > /*
> > > * gcc provides both __inline__ and __inline as alternate spellings of
> >
> > [Severity: Critical]
> > Could removing notrace from inline cause a triple-fault during x86 suspend
> > resume, secondary CPU bringup, or kexec when function tracing or call-depth
> > tracking is active?
> >
> > In include/linux/compiler_attributes.h, __always_inline expands to inline:
> >
> > #define __always_inline inline __attribute__((__always_inline__))
>
> I wonder whether we need __always_inline to be notrace, and whether
> this resolves any of these concerns.
Yes, we should add "notrace" to the __always_inline for the reasons given
by sashiko. I'll look a the other comments to see if there's other issues.
-- Steve
next prev parent reply other threads:[~2026-10-22 13:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 22:22 [PATCH] compiler_types: Do not mark inline functions notrace Song Liu
2026-10-21 23:09 ` sashiko-bot
2026-10-21 23:38 ` Song Liu
2026-10-22 13:25 ` Steven Rostedt [this message]
2026-10-22 14:27 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261022092526.46261360@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=kernel-team@meta.com \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox