From: Heiko Carstens <hca@linux.ibm.com>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Alexander Potapenko <glider@google.com>,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
Boqun Feng <boqun@kernel.org>, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] s390/irqflags: add out-of-line definitions of arch_local_irq_*() for KMSAN
Date: Thu, 6 Aug 2026 12:17:40 +0200 [thread overview]
Message-ID: <20260806101740.15764C97-hca@linux.ibm.com> (raw)
In-Reply-To: <20260806100038.3163298-1-iii@linux.ibm.com>
On Thu, Aug 06, 2026 at 12:00:19PM +0200, Ilya Leoshkevich wrote:
> Inline KMSAN arch_local_irq_*() definitions run afoul of
> -Wstatic-in-inline. Move them out-of-line. Decompressor is not
> instrumented, so make sure it keeps using inline definitions.
> Make sure non-GPL modules see the out-of-line definitions.
>
> Cc: Boqun Feng <boqun@kernel.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202607131219.euJHPSJ5-lkp@intel.com/
> Suggested-by: Heiko Carstens <hca@linux.ibm.com>
> Fixes: 1b301f5f28ba ("s390/irqflags: do not instrument arch_local_irq_*() with KMSAN")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
> arch/s390/include/asm/irqflags.h | 20 +++++++++++++-------
> arch/s390/kernel/Makefile | 1 +
> arch/s390/kernel/irqflags.c | 27 +++++++++++++++++++++++++++
> 3 files changed, 41 insertions(+), 7 deletions(-)
> create mode 100644 arch/s390/kernel/irqflags.c
Don't we have the very same problem in arch/s390/include/asm/uaccess.h
with uaccess_kmsan_or_inline too?
> -#ifdef CONFIG_KMSAN
> -#define arch_local_irq_attributes noinline notrace __no_sanitize_memory __maybe_unused
> +#if defined(CONFIG_KMSAN) && !defined(__DECOMPRESSOR)
> +extern unsigned long arch_local_save_flags(void);
> +extern unsigned long arch_local_irq_save(void);
> +extern void arch_local_irq_enable_external(void);
> +extern void arch_local_irq_enable(void);
FWIW, we go without "extern" for function prototypes.
> #else
> -#define arch_local_irq_attributes __always_inline
> +#define arch_local_save_flags __arch_local_save_flags
> +#define arch_local_irq_save __arch_local_irq_save
> +#define arch_local_irq_enable_external __arch_local_irq_enable_external
> +#define arch_local_irq_enable __arch_local_irq_enable
> #endif
For the sake of readability: could you adjust all of them with tabs?
Like e.g.:
#define arch_local_save_flags __arch_local_save_flags
#define arch_local_irq_save __arch_local_irq_save
#define arch_local_irq_enable_external __arch_local_irq_enable_external
#define arch_local_irq_enable __arch_local_irq_enable
And just to annoy you: the patch subject needs to be adjusted to:
s390/irqflags: add out-of-line definitions of arch_local_irq_*() for KMSAN
^
In the meantime we require always an upper case letter following the
component.
> +++ b/arch/s390/kernel/irqflags.c
> @@ -0,0 +1,27 @@
> +// SPDX-License-Identifier: GPL-2.0
> +#include <asm/irqflags.h>
> +#include <linux/export.h>
Please add an empty line before the first include, and also change the order
of includes - "linux" should always come before "asm".
next prev parent reply other threads:[~2026-08-06 10:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 10:00 [PATCH] s390/irqflags: add out-of-line definitions of arch_local_irq_*() for KMSAN Ilya Leoshkevich
2026-08-06 10:17 ` Heiko Carstens [this message]
2026-08-06 18:41 ` Ilya Leoshkevich
2026-08-06 10:19 ` sashiko-bot
2026-08-06 18:38 ` 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=20260806101740.15764C97-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=boqun@kernel.org \
--cc=glider@google.com \
--cc=gor@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=lkp@intel.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