Skip to content

Commit 83d0edf

Browse files
ramosian-gliderakpm00
authored andcommitted
kmsan: make sure PREEMPT_RT is off
As pointed out by Peter Zijlstra, __msan_poison_alloca() does not play well with IRQ code when PREEMPT_RT is on, because in that mode even GFP_ATOMIC allocations cannot be performed. Fixing this would require making stackdepot completely lockless, which is quite challenging and may be excessive for the time being. Instead, make sure KMSAN is incompatible with PREEMPT_RT, like other debug configs are. Link: https://lkml.kernel.org/r/20221102110611.1085175-4-glider@google.com Link: https://lore.kernel.org/lkml/20221025221755.3810809-1-glider@google.com/ Signed-off-by: Alexander Potapenko <glider@google.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Marco Elver <elver@google.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent ac66998 commit 83d0edf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Kconfig.kmsan

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ config KMSAN
1212
bool "KMSAN: detector of uninitialized values use"
1313
depends on HAVE_ARCH_KMSAN && HAVE_KMSAN_COMPILER
1414
depends on SLUB && DEBUG_KERNEL && !KASAN && !KCSAN
15+
depends on !PREEMPT_RT
1516
select STACKDEPOT
1617
select STACKDEPOT_ALWAYS_INIT
1718
help

0 commit comments

Comments
 (0)