Re: [PATCH 2/3] mm: update core kernel code to use vm_flags_t consistently

From
Uladzislau Rezki <urezki@gmail.com>
Date
2025-07-29 18:39:08
Also in
kvm, linux-fsdevel, linux-mm, linuxppc-dev, lkml, nvdimm, sparclinux
Reply to
Lorenzo Stoakes, 2025-07-29
On Tue, Jul 29, 2025 at 06:25:39AM +0100, Lorenzo Stoakes wrote:
Andrew - FYI there's nothing to worry about here, the type remains
precisely the same, and I'll send a patch to fix this trivial issue so when
later this type changes vmalloc will be uaffected.

On Tue, Jul 29, 2025 at 09:15:51AM +0900, Harry Yoo wrote:
quoted
[Adding Uladzislau to Cc]
Ulad - could we PLEASE get rid of 'vm_flags' in vmalloc? It's the precise
same name and (currently) type as vma->vm_flags and is already the source
of confusion.
You mean all "vm_flags" variable names? "vm_struct" has flags as a
member. So you want:

urezki@pc638:~/data/backup/coding/linux-not-broken.git$ grep -rn vm_flags mm/execmem.c
29:                          pgprot_t pgprot, unsigned long vm_flags)
39:             vm_flags |= VM_DEFER_KMEMLEAK;
41:     if (vm_flags & VM_ALLOW_HUGE_VMAP)
45:                              pgprot, vm_flags, NUMA_NO_NODE,
51:                                      pgprot, vm_flags, NUMA_NO_NODE,
85:                          pgprot_t pgprot, unsigned long vm_flags)
259:    unsigned long vm_flags = VM_ALLOW_HUGE_VMAP;
266:    p = execmem_vmalloc(range, alloc_size, PAGE_KERNEL, vm_flags);
376:    unsigned long vm_flags = VM_FLUSH_RESET_PERMS;
385:            p = execmem_vmalloc(range, size, pgprot, vm_flags);
urezki@pc638:~/data/backup/coding/linux-not-broken.git$ grep -rn vm_flags mm/vmalloc.c
3853: * @vm_flags:                additional vm area flags (e.g. %VM_NO_GUARD)
3875:                   pgprot_t prot, unsigned long vm_flags, int node,
3894:   if (vmap_allow_huge && (vm_flags & VM_ALLOW_HUGE_VMAP)) {
3912:                             VM_UNINITIALIZED | vm_flags, start, end, node,
3977:   if (!(vm_flags & VM_DEFER_KMEMLEAK))
4621:   vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
urezki@pc638:~/data/backup/coding/linux-not-broken.git$ grep -rn vm_flags mm/execmem.c
29:                          pgprot_t pgprot, unsigned long vm_flags)
39:             vm_flags |= VM_DEFER_KMEMLEAK;
41:     if (vm_flags & VM_ALLOW_HUGE_VMAP)
45:                              pgprot, vm_flags, NUMA_NO_NODE,
51:                                      pgprot, vm_flags, NUMA_NO_NODE,
85:                          pgprot_t pgprot, unsigned long vm_flags)
259:    unsigned long vm_flags = VM_ALLOW_HUGE_VMAP;
266:    p = execmem_vmalloc(range, alloc_size, PAGE_KERNEL, vm_flags);
376:    unsigned long vm_flags = VM_FLUSH_RESET_PERMS;
385:            p = execmem_vmalloc(range, size, pgprot, vm_flags);
urezki@pc638:~/data/backup/coding/linux-not-broken.git$ grep -rn vm_flags ./include/linux/vmalloc.h
172:                    pgprot_t prot, unsigned long vm_flags, int node,
urezki@pc638:~/data/backup/coding/linux-not-broken.git$

to rename all those "vm_flags" to something, for example, like "flags"?

Thanks!

--
Uladzislau Rezki
Thread (48 messages) 48 messages, 16 authors, last reply 2025-08-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help