linux/mm/kmsan
Uladzislau Rezki (Sony) b186a94227 kmsan: remove hard-coded GFP_KERNEL flags
kmsan_vmap_pages_range_noflush() allocates its temp s_pages/o_pages arrays
with GFP_KERNEL, which may sleep.  This is inconsistent with vmalloc() as
it will support non-blocking requests later.

Plumb gfp_mask through the kmsan_vmap_pages_range_noflush(), so it can use
it internally for its demand.

Please note, the subsequent __vmap_pages_range_noflush() still uses
GFP_KERNEL and can sleep.  If a caller runs under reclaim constraints,
sleeping is forbidden, it must establish the appropriate memalloc scope
API.

Link: https://lkml.kernel.org/r/20251007122035.56347-8-urezki@gmail.com
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Cc: Marco Elver <elver@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-11-16 17:27:54 -08:00
..
Makefile kmsan: disable ftrace in kmsan core code 2023-02-20 12:46:16 -08:00
core.c mm: fix some typos in mm module 2025-11-16 17:27:52 -08:00
hooks.c mm/kmsan: fix kmsan kmalloc hook when no stack depots are allocated yet 2025-11-09 21:19:42 -08:00
init.c kmsan: apply clang-format to files mm/kmsan/ 2025-05-21 09:55:15 -07:00
instrumentation.c kmsan: rework kmsan_in_runtime() handling in kmsan_report() 2025-05-21 09:55:16 -07:00
kmsan.h kmsan: drop the declaration of kmsan_save_stack() 2025-05-21 09:55:16 -07:00
kmsan_test.c kmsan: fix out-of-bounds access to shadow memory 2025-09-25 16:10:34 -07:00
report.c kmsan: rework kmsan_in_runtime() handling in kmsan_report() 2025-05-21 09:55:16 -07:00
shadow.c kmsan: remove hard-coded GFP_KERNEL flags 2025-11-16 17:27:54 -08:00