[PATCH v2 00/13] mm: convert more vm_flags_t users to vma_flags_t
Lorenzo Stoakes <[email protected]> Sat, 11 Jul 2026 19:44:57 +0100
| Newsgroups | gmane.comp.freedesktop.xorg.nouveau,gmane.linux.kernel.mm,gmane.linux.kernel,gmane.linux.ports.mips,gmane.linux.kernel.aio.general,gmane.linux.file-systems,gmane.linux.ports.ppc64.devel,gmane.comp.video.dri.devel,gmane.linux.ports.arm.kernel,gmane.linux.kernel.samsung-soc,gmane.comp.freedesktop.xorg.drivers.intel,gmane.linux.ports.arm.msm,gmane.comp.freedesktop.xorg.drivers.freedreno,gmane.linux.ports.arm.rockchip,gmane.linux.ports.tegra,gmane.comp.emulators.xen.devel,gmane.linux.sound |
|---|---|
| Message-ID | <20260711-b4-vma-flags-mm-v2-0-0fa2357d5431__33864.8616963596$1783864634$gmane$org@kernel.org> |
This series makes further progress in converting usage of the deprecated vm_flags_t type to its replacement, vma_flags_t. It focuses on mm, though updates some users of mm APIs also. It updates: * The core do_mmap() code path for VMA mapping. * Unmapped area logic. * The usage of mm->def_vma_flags. * VMA page protection bit logic. * General usage of VMA flags in core mm code, mlock, mprotect, mremap. REVIEWER/MERGER NOTE: This is dependent on [0], which must be merged before this. [0]:https://lore.kernel.org/linux-mm/20260710-b4-pre-scalable-cow-v2-0-2a5aa403d977-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org/ Signed-off-by: Lorenzo Stoakes <[email protected]> --- Changes in v2: * Rebased on to mm-new that has the 33 patch rework dependency in it. * Distributed tags, thanks everybody! * Moved VMA_STACK_INCOMPLETE_SETUP and VMA_STACK_EARLY VMA userland test defines from 1/13 to 9/13 as per Zi. * Fixed whitespace in 3/13 as per Zi. * Updated 5/13 to use %*pb formatter for VMA flags (to match mm flags formatter) in dump_mm(), as per Lance. * Updated 8/13 to update panthor_gem.c to vma_get_page_prot() as per Lance. * Fixed up comment type in 11/13 as per Lance. * Fixed bug of using VMA_GROWSUP_BIT rather than VMA_GROWSUP as per Lance in 12/13. * Added detail about when we are and are not required to open code vma_write_lock() for VMA flag mutators in the commit message for 13/13 as per Lance and Zi. v1: https://patch.msgid.link/[email protected] To: Andrew Morton <akpm-de/[email protected]> To: David Hildenbrand <[email protected]> To: "Liam R. Howlett" <[email protected]> To: Vlastimil Babka <[email protected]> To: Mike Rapoport <[email protected]> To: Suren Baghdasaryan <[email protected]> To: Michal Hocko <mhocko-IBi9RG/[email protected]> To: Thomas Bogendoerfer <[email protected]> To: Benjamin LaHaise <[email protected]> To: Alexander Viro <viro-RmSDqhL/[email protected]> To: Christian Brauner <[email protected]> To: Jan Kara <[email protected]> To: Hugh Dickins <[email protected]> To: Baolin Wang <baolin.wang-KPsoFbNs7GizrGE5bRqYAgC/[email protected]> To: Jann Horn <[email protected]> To: Pedro Falcato <[email protected]> To: Muchun Song <[email protected]> To: Oscar Salvador <[email protected]> To: Zi Yan <[email protected]> To: Nico Pache <[email protected]> To: Ryan Roberts <[email protected]> To: Dev Jain <[email protected]> To: Barry Song <[email protected]> To: Lance Yang <[email protected]> To: Usama Arif <[email protected]> To: Madhavan Srinivasan <[email protected]> To: Michael Ellerman <mpe-Gsx/[email protected]> To: Nicholas Piggin <[email protected]> To: "Christophe Leroy (CS GROUP)" <[email protected]> To: Maarten Lankhorst <maarten.lankhorst-VuQAYsv1563Yd54FQh9/[email protected]> To: Maxime Ripard <[email protected]> To: Thomas Zimmermann <[email protected]> To: David Airlie <[email protected]> To: Simona Vetter <simona-/[email protected]> To: Lucas Stach <[email protected]> To: Russell King <[email protected]> To: Christian Gmeiner <[email protected]> To: Inki Dae <[email protected]> To: Seung-Woo Kim <[email protected]> To: Kyungmin Park <[email protected]> To: Krzysztof Kozlowski <[email protected]> To: Peter Griffin <[email protected]> To: Alim Akhtar <[email protected]> To: Jani Nikula <jani.nikula-VuQAYsv1563Yd54FQh9/[email protected]> To: Joonas Lahtinen <joonas.lahtinen-VuQAYsv1563Yd54FQh9/[email protected]> To: Rodrigo Vivi <[email protected]> To: Tvrtko Ursulin <[email protected]> To: Rob Clark <[email protected]> To: Dmitry Baryshkov <[email protected]> To: Abhinav Kumar <[email protected]> To: Jessica Zhang <[email protected]> To: Sean Paul <[email protected]> To: Marijn Suijten <[email protected]> To: Lyude Paul <[email protected]> To: Danilo Krummrich <[email protected]> To: Tomi Valkeinen <tomi.valkeinen-ryLnwIuWjnjg/[email protected]> To: Sandy Huang <[email protected]> To: Heiko Stübner <[email protected]> To: Andy Yan <[email protected]> To: Thierry Reding <[email protected]> To: Mikko Perttunen <[email protected]> To: Jonathan Hunter <[email protected]> To: Gerd Hoffmann <[email protected]> To: Dmitry Osipenko <dmitry.osipenko-ZGY8ohtN/[email protected]> To: Gurchetan Singh <[email protected]> To: Chia-I Wu <[email protected]> To: Zack Rusin <zack.rusin-dY08KVG/lbpWk0Htik3J/[email protected]> To: Broadcom internal kernel review list <bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/[email protected]> To: Matthew Brost <[email protected]> To: Thomas Hellström <thomas.hellstrom-VuQAYsv1563Yd54FQh9/[email protected]> To: Oleksandr Andrushchenko <[email protected]> To: Helge Deller <[email protected]> To: Kees Cook <[email protected]> To: Jaroslav Kysela <perex-/Fr2/[email protected]> To: Takashi Iwai <tiwai-IBi9RG/[email protected]> To: Boris Brezillon <boris.brezillon-ZGY8ohtN/[email protected]> To: Steven Price <[email protected]> To: Liviu Dudau <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: linuxppc-dev-uLR06cmDAlY/[email protected] Cc: [email protected] Cc: [email protected] Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: virtualization-cunTk1MwBs/[email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] --- Lorenzo Stoakes (13): mm: introduce vma_flags_can_grow() and vma_can_grow() mm/vma: update do_mmap() to use vma_flags_t mm: convert __get_unmapped_area() to use vma_flags_t mm: update generic_get_unmapped_area[_topdown]() to use vma_flags_t mm: prefer mm->def_vma_flags in mm logic mm/vma: convert vm_pgprot_modify() to use vma_flags_t and rename mm/vma: rename vma_get_page_prot to vma_flags_to_page_prot mm: introduce vma_get_page_prot() and use it mm/vma: update create_init_stack_vma() to use vma_flags_t mm/vma: convert miscellaneous uses of VMA flags in core mm mm/mlock: convert mlock code to use vma_flags_t mm/mprotect: convert mprotect code to use vma_flags_t mm/mremap: convert mremap code to use vma_flags_t arch/mips/kernel/vdso.c | 4 +- arch/powerpc/mm/book3s64/slice.c | 6 +- drivers/gpu/drm/drm_gem.c | 2 +- drivers/gpu/drm/drm_gem_dma_helper.c | 2 +- drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 6 +- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 12 +- drivers/gpu/drm/msm/msm_gem.c | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 6 +- drivers/gpu/drm/panthor/panthor_gem.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 2 +- drivers/gpu/drm/tegra/gem.c | 2 +- drivers/gpu/drm/virtio/virtgpu_vram.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c | 2 +- drivers/gpu/drm/xe/xe_device.c | 2 +- drivers/gpu/drm/xe/xe_mmio_gem.c | 2 +- drivers/gpu/drm/xen/xen_drm_front_gem.c | 2 +- drivers/video/fbdev/core/fb_io_fops.c | 2 +- fs/aio.c | 2 +- fs/hugetlbfs/inode.c | 3 +- include/linux/huge_mm.h | 10 +- include/linux/memfd.h | 6 +- include/linux/mm.h | 52 +++++++-- include/linux/sched/mm.h | 13 +-- ipc/shm.c | 3 +- mm/debug.c | 5 +- mm/huge_memory.c | 21 ++-- mm/memfd.c | 15 +-- mm/mlock.c | 99 +++++++++-------- mm/mmap.c | 164 +++++++++++++++------------- mm/mprotect.c | 16 +-- mm/mremap.c | 38 ++++--- mm/nommu.c | 3 +- mm/util.c | 10 +- mm/vma.c | 26 +++-- mm/vma.h | 8 +- mm/vma_exec.c | 20 ++-- sound/core/memalloc.c | 2 +- tools/testing/vma/include/dup.h | 23 ++-- 42 files changed, 341 insertions(+), 264 deletions(-) --- base-commit: 61cccb8363fcc282d4ae0555b8739dd227f5ad0b change-id: 20260711-b4-vma-flags-mm-bd05385df9fc Cheers, -- Lorenzo Stoakes <[email protected]>