From: Ilya Leoshkevich Date: Fri, 21 Jun 2024 11:34:47 +0000 (+0200) Subject: kmsan: disable KMSAN when DEFERRED_STRUCT_PAGE_INIT is enabled X-Git-Tag: v6.11-rc1~85^2~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=854fa98d1dffd65fee741c742b527a7cf8630dd0;p=thirdparty%2Fkernel%2Fstable.git kmsan: disable KMSAN when DEFERRED_STRUCT_PAGE_INIT is enabled KMSAN relies on memblock returning all available pages to it (see kmsan_memblock_free_pages()). It partitions these pages into 3 categories: pages available to the buddy allocator, shadow pages and origin pages. This partitioning is static. If new pages appear after kmsan_init_runtime(), it is considered an error. DEFERRED_STRUCT_PAGE_INIT causes this, so mark it as incompatible with KMSAN. Link: https://lkml.kernel.org/r/20240621113706.315500-4-iii@linux.ibm.com Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Cc: Marco Elver Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Pekka Enberg Cc: Roman Gushchin Cc: Steven Rostedt (Google) Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Signed-off-by: Andrew Morton --- diff --git a/mm/Kconfig b/mm/Kconfig index e15256b6e1355..991fa9cf61373 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -952,6 +952,7 @@ config DEFERRED_STRUCT_PAGE_INIT depends on SPARSEMEM depends on !NEED_PER_CPU_KM depends on 64BIT + depends on !KMSAN select PADATA help Ordinarily all struct pages are initialised during early boot in a