[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2620ab0bbba640b6237c50b9c0dca1c7d1142f5d.1764410067.git.chleroy@kernel.org>
Date: Sat, 29 Nov 2025 10:56:02 +0100
From: "Christophe Leroy (CS GROUP)" <chleroy@...nel.org>
To: Richard Weinberger <richard@....at>,
Anton Ivanov <anton.ivanov@...bridgegreys.com>,
Johannes Berg <johannes@...solutions.net>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
Alexander Potapenko <glider@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Sabyrzhan Tasbolatov <snovitoll@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Ritesh Harjani (IBM)" <ritesh.list@...il.com>
Cc: "Christophe Leroy (CS GROUP)" <chleroy@...nel.org>,
linux-um@...ts.infradead.org,
linux-kernel@...r.kernel.org,
kasan-dev@...glegroups.com,
kernel test robot <lkp@...el.com>
Subject: [PATCH] um: Disable KASAN_INLINE when STATIC_LINK is selected
um doesn't support KASAN_INLINE together with STATIC_LINK.
Instead of failing the build, disable KASAN_INLINE when
STATIC_LINK is selected.
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511290451.x9GZVJ1l-lkp@intel.com/
Fixes: 1e338f4d99e6 ("kasan: introduce ARCH_DEFER_KASAN and unify static key across modes")
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@...nel.org>
---
arch/um/Kconfig | 1 +
arch/um/include/asm/kasan.h | 4 ----
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index 49781bee7905..93ed850d508e 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -5,6 +5,7 @@ menu "UML-specific options"
config UML
bool
default y
+ select ARCH_DISABLE_KASAN_INLINE if STATIC_LINK
select ARCH_NEEDS_DEFER_KASAN if STATIC_LINK
select ARCH_WANTS_DYNAMIC_TASK_STRUCT
select ARCH_HAS_CACHE_LINE_SIZE
diff --git a/arch/um/include/asm/kasan.h b/arch/um/include/asm/kasan.h
index b54a4e937fd1..81bcdc0f962e 100644
--- a/arch/um/include/asm/kasan.h
+++ b/arch/um/include/asm/kasan.h
@@ -24,10 +24,6 @@
#ifdef CONFIG_KASAN
void kasan_init(void);
-
-#if defined(CONFIG_STATIC_LINK) && defined(CONFIG_KASAN_INLINE)
-#error UML does not work in KASAN_INLINE mode with STATIC_LINK enabled!
-#endif
#else
static inline void kasan_init(void) { }
#endif /* CONFIG_KASAN */
--
2.49.0
Powered by blists - more mailing lists