Re: [PATCH v4 07/10] kmsan: Remove hard-coded GFP_KERNEL flags

Alexander Potapenko
2025-10-07T12:38:22Z

On Tue, Oct 7, 2025 at 2:20 PM Uladzislau Rezki (Sony) <urezki@gmail.com> wrote:
>
> 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.
>
> Cc: Alexander Potapenko <glider@google.com>
> Cc: Marco Elver <elver@google.com>
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: Alexander Potapenko <glider@google.com>

Thank you!