On Mon, Jun 03, 2024 at 11:59:01AM -0400, Kent Overstreet wrote: > On Fri, May 31, 2024 at 06:56:01AM -0700, Christoph Hellwig wrote: > > > void *vmalloc_user(unsigned long size) > > > { > > > - return __vmalloc_node_range(size, SHMLBA, VMALLOC_START, VMALLOC_END, > > > - GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL, > > > - VM_USERMAP, NUMA_NO_NODE, > > > - __builtin_return_address(0)); > > > + return _vmalloc_node_user(size, NUMA_NO_NODE); > > > > But I suspect simply adding a gfp_t argument to vmalloc_node might be > > a much easier to use interface here, even if it would need a sanity > > check to only allow for actually useful to vmalloc flags. > > vmalloc doesn't properly support gfp flags due to page table allocation Which I tried to cover by the above "to only allow for actually useful to vmalloc flags". I.e. the __GFP_ZERO used here is useful, as would be a GFP_USER which we'd probably actually want here as well.