From: Heiko Carstens <hca@linux.ibm.com>
To: Boqun Feng <boqun@kernel.org>, Ilya Leoshkevich <iii@linux.ibm.com>
Cc: kernel test robot <lkp@intel.com>, Lyude Paul <lyude@redhat.com>,
llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Benno Lossin <lossin@kernel.org>,
Andreas Hindborg <a.hindborg@kernel.org>,
Gary Guo <gary@garyguo.net>, Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [boqun:rust-rcu 14/27] rust/helpers/interrupt.c:17:9: warning: static function 'arch_local_save_flags' is used in an inline function with external linkage
Date: Thu, 16 Jul 2026 13:56:52 +0200 [thread overview]
Message-ID: <20260716115652.25491C83-hca@linux.ibm.com> (raw)
In-Reply-To: <alfbtUKkXANyGyYf@tardis.local>
On Wed, Jul 15, 2026 at 12:12:53PM -0700, Boqun Feng wrote:
> [Cc s390]
> > In file included from rust/helpers/helpers.c:68:
> > >> rust/helpers/interrupt.c:17:9: warning: static function 'arch_local_save_flags' is used in an inline function with external linkage [-Wstatic-in-inline]
> > 17 | return irqs_disabled();
> > | ^
> > include/linux/irqflags.h:256:3: note: expanded from macro 'irqs_disabled'
> > 256 | raw_local_save_flags(_flags); \
> > | ^
> > include/linux/irqflags.h:184:11: note: expanded from macro 'raw_local_save_flags'
> > 184 | flags = arch_local_save_flags(); \
> > | ^
> > rust/helpers/interrupt.c:15:1: note: use 'static' to give inline function 'rust_helper_irqs_disabled' internal linkage
> > 15 | __rust_helper bool rust_helper_irqs_disabled(void)
> > | ^
> > | static
> > rust/helpers/helpers.c:38:23: note: expanded from macro '__rust_helper'
> > 38 | #define __rust_helper __always_inline
> > | ^
> > include/linux/compiler_attributes.h:55:41: note: expanded from macro '__always_inline'
> > 55 | #define __always_inline inline __attribute__((__always_inline__))
> > | ^
> > include/linux/compiler_types.h:235:16: note: expanded from macro 'inline'
> > 235 | #define inline inline __gnu_inline __inline_maybe_unused notrace
> > | ^
> > arch/s390/include/asm/irqflags.h:46:48: note: 'arch_local_save_flags' declared here
> > 46 | static arch_local_irq_attributes unsigned long arch_local_save_flags(void)
> > | ^
> > 1 warning generated.
> > warning: 1 warning emitted
> >
>
> This seems not a Rust-only issue to me, basically you got the warning
> whenever you have an inline function calling irqs_disabled(). I'm a bit
> curious why 1b301f5f28ba ("s390/irqflags: do not instrument
> arch_local_irq_*() with KMSAN") wanted to add noinline when KMSAN=y, all
> you need is noinstr, no?
While the combination of __always_inline and noinstr _seems_ to work
with clang, this looks just wrong to me. I guess we really would need
a (single) out-of-line variant of the affected functions in question
for KMSAN.
Ilya, since that was your commit, does that sound sane?
next prev parent reply other threads:[~2026-07-16 11:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 4:45 [boqun:rust-rcu 14/27] rust/helpers/interrupt.c:17:9: warning: static function 'arch_local_save_flags' is used in an inline function with external linkage kernel test robot
2026-07-15 19:12 ` Boqun Feng
2026-07-16 11:42 ` Ilya Leoshkevich
2026-07-16 11:56 ` Heiko Carstens [this message]
2026-07-16 13:54 ` Ilya Leoshkevich
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=20260716115652.25491C83-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=a.hindborg@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=boqun@kernel.org \
--cc=borntraeger@linux.ibm.com \
--cc=gary@garyguo.net \
--cc=gor@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=svens@linux.ibm.com \
/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