From: Alexander Potapenko Date: Wed, 2 Nov 2022 11:06:10 +0000 (+0100) Subject: kmsan: make sure PREEMPT_RT is off X-Git-Tag: v6.6.17~6058^2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83d0edfa04eeca46b3eff554fb42b2fefe97bdf1;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Peter Zijlstra (Intel) Cc: Dmitry Vyukov Cc: Marco Elver Cc: Borislav Petkov Cc: Dave Hansen Cc: Ingo Molnar Cc: Kees Cook Cc: Masahiro Yamada Cc: Nick Desaulniers Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- diff --git a/lib/Kconfig.kmsan b/lib/Kconfig.kmsan index b2489dd..ef2c8f2 100644 --- a/lib/Kconfig.kmsan +++ b/lib/Kconfig.kmsan @@ -12,6 +12,7 @@ config KMSAN bool "KMSAN: detector of uninitialized values use" depends on HAVE_ARCH_KMSAN && HAVE_KMSAN_COMPILER depends on SLUB && DEBUG_KERNEL && !KASAN && !KCSAN + depends on !PREEMPT_RT select STACKDEPOT select STACKDEPOT_ALWAYS_INIT help