Re: [PATCH v4 24/25] mm/vma: convert __mmap_region() to use vma_flags_t
"Vlastimil Babka (SUSE)" <[email protected]> Mon, 23 Mar 2026 16:49:44 +0100
| Newsgroups | org.kernel.vger.linux-hexagon,dev.linux.lists.loongarch,org.infradead.lists.linux-riscv,org.infradead.lists.linux-snps-arc,org.infradead.lists.linux-um,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-mips,org.kernel.vger.linux-s390,org.kernel.vger.selinux,org.kvack.linux-mm,org.ozlabs.lists.linuxppc-dev |
|---|---|
| Message-ID | <[email protected]> |
On 3/20/26 8:38 PM, Lorenzo Stoakes (Oracle) wrote: > Update the mmap() implementation logic implemented in __mmap_region() and > functions invoked by it. The mmap_region() function converts its input > vm_flags_t parameter to a vma_flags_t value which it then passes to > __mmap_region() which uses the vma_flags_t value consistently from then > on. > > As part of the change, we convert map_deny_write_exec() to using > vma_flags_t (it was incorrectly using unsigned long before), and place it > in vma.h, as it is only used internal to mm. > > With this change, we eliminate the legacy is_shared_maywrite_vm_flags() > helper function which is now no longer required. > > We are also able to update the MMAP_STATE() and VMG_MMAP_STATE() macros to > use the vma_flags_t value. > > Finally, we update the VMA tests to reflect the change. > > Signed-off-by: Lorenzo Stoakes (Oracle) <[email protected]> Acked-by: Vlastimil Babka (SUSE) <[email protected]>