Skip to content

Commit a3209bb

Browse files
Christophe Leroy (CS GROUP)jmberg-intel
authored andcommitted
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@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202511290451.x9GZVJ1l-lkp@intel.com/ Fixes: 1e338f4 ("kasan: introduce ARCH_DEFER_KASAN and unify static key across modes") Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Link: https://patch.msgid.link/2620ab0bbba640b6237c50b9c0dca1c7d1142f5d.1764410067.git.chleroy@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent a74b6c0 commit a3209bb

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

arch/um/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ menu "UML-specific options"
55
config UML
66
bool
77
default y
8+
select ARCH_DISABLE_KASAN_INLINE if STATIC_LINK
89
select ARCH_NEEDS_DEFER_KASAN if STATIC_LINK
910
select ARCH_WANTS_DYNAMIC_TASK_STRUCT
1011
select ARCH_HAS_CACHE_LINE_SIZE

arch/um/include/asm/kasan.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424

2525
#ifdef CONFIG_KASAN
2626
void kasan_init(void);
27-
28-
#if defined(CONFIG_STATIC_LINK) && defined(CONFIG_KASAN_INLINE)
29-
#error UML does not work in KASAN_INLINE mode with STATIC_LINK enabled!
30-
#endif
3127
#else
3228
static inline void kasan_init(void) { }
3329
#endif /* CONFIG_KASAN */

0 commit comments

Comments
 (0)