Re: [RFC PATCH v2 1/4] mm/vmalloc: warn on invalid vmalloc gfp flags

From: Christoph Hellwig
Date: Tue Nov 04 2025 - 06:09:52 EST


On Mon, Nov 03, 2025 at 11:04:26AM -0800, Vishal Moola (Oracle) wrote:
> Vmalloc explicitly supports a list of flags, but we never enforce them.
> vmalloc has been trying to handle unsupported flags by clearing and
> setting flags wherever necessary. This is messy and makes the code
> harder to understand, when we could simply check for a supported input
> immediately instead.
>
> Define a helper mask and function telling callers they have passed in
> invalid flags, and clear those unsupported vmalloc flags.

Looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

And just for the record: I very much suspect we'll find someone
passing unsuported flags soon with this hidden somewhere that will
need fixing or at least temporarily extending the mask.