From: Peter Zijlstra <peterz@infradead.org>
To: Alexander Potapenko <glider@google.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>,
Dmitry Vyukov <dvyukov@google.com>,
Marco Elver <elver@google.com>
Subject: Re: [PATCH 4/5] kmsan: make sure PREEMPT_RT is off
Date: Wed, 2 Nov 2022 13:53:00 +0100 [thread overview]
Message-ID: <Y2JoLOXtvmcVx8mU@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20221102110611.1085175-4-glider@google.com>
On Wed, Nov 02, 2022 at 12:06:10PM +0100, Alexander Potapenko wrote:
> 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.
>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Marco Elver <elver@google.com>
> Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
> 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>
> ---
> lib/Kconfig.kmsan | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/Kconfig.kmsan b/lib/Kconfig.kmsan
> index b2489dd6503fa..ef2c8f256c57d 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
> --
> 2.38.1.273.g43a17bfeac-goog
>
next prev parent reply other threads:[~2022-11-02 12:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 11:06 [PATCH 1/5] kmsan: core: kmsan_in_runtime() should return true in NMI context Alexander Potapenko
2022-11-02 11:06 ` [PATCH 2/5] x86/uaccess: instrument copy_from_user_nmi() Alexander Potapenko
2022-11-02 12:52 ` Peter Zijlstra
2022-11-02 11:06 ` [PATCH 3/5] Kconfig.debug: ensure early check for KMSAN in CONFIG_KMSAN_WARN Alexander Potapenko
2022-11-02 11:06 ` [PATCH 4/5] kmsan: make sure PREEMPT_RT is off Alexander Potapenko
2022-11-02 12:53 ` Peter Zijlstra [this message]
2022-11-02 11:06 ` [PATCH 5/5] x86/traps: avoid KMSAN bugs originating from handle_bug() Alexander Potapenko
2022-11-02 12:50 ` Peter Zijlstra
2022-11-02 13:37 ` Alexander Potapenko
2022-11-03 11:18 ` Peter Zijlstra
2022-11-03 11:18 ` Peter Zijlstra
2022-11-03 13:37 ` Alexander Potapenko
2022-11-02 12:52 ` [PATCH 1/5] kmsan: core: kmsan_in_runtime() should return true in NMI context Peter Zijlstra
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=Y2JoLOXtvmcVx8mU@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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