[merged mm-stable] mm-vma-convert-vm_pgprot_modify-to-use-vma_flags_t-and-rename.patch removed from -mm tree
Andrew Morton <[email protected]>
| Newsgroups | org.kernel.vger.mm-commits |
|---|---|
| Message-ID | <[email protected]> |
The quilt patch titled
Subject: mm/vma: convert vm_pgprot_modify() to use vma_flags_t and rename
has been removed from the -mm tree. Its filename was
mm-vma-convert-vm_pgprot_modify-to-use-vma_flags_t-and-rename.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Lorenzo Stoakes <[email protected]>
Subject: mm/vma: convert vm_pgprot_modify() to use vma_flags_t and rename
Date: Sat, 11 Jul 2026 19:45:03 +0100
Update vm_pgprot_modify() to use the new VMA flags type vma_flags_t
and rename to vma_pgprot_modify() accordingly.
This is part of the ongoing work to convert vm_flags_t to vma_flags_t, in
order to eliminate the arbitrary limit of the number of bits in a system
word on available VMA flags.
Update VMA userland tests accordingly, updating vma_set_page_prot() to no
longer inline vma_pgprot_modify(), rather we can simply define
vma_pgprot_modify() as a static inline function and the tests will pick it
up from vma.h.
No functional change intended.
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Lorenzo Stoakes <[email protected]>
Reviewed-by: Lance Yang <[email protected]>
Reviewed-by: Zi Yan <[email protected]>
Reviewed-by: Vlastimil Babka (SUSE) <[email protected]>
Cc: Baolin Wang <[email protected]>
Cc: Barry Song <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Dev Jain <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Jann Horn <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Nico Pache <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Pedro Falcato <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
mm/mmap.c | 8 ++++----
mm/vma.c | 2 +-
mm/vma.h | 6 ++++--
3 files changed, 9 insertions(+), 7 deletions(-)
--- a/mm/mmap.c~mm-vma-convert-vm_pgprot_modify-to-use-vma_flags_t-and-rename
+++ a/mm/mmap.c
@@ -80,13 +80,13 @@ core_param(ignore_rlimit_data, ignore_rl
/* Update vma->vm_page_prot to reflect vma->vm_flags. */
void vma_set_page_prot(struct vm_area_struct *vma)
{
- vm_flags_t vm_flags = vma->vm_flags;
+ vma_flags_t vma_flags = vma->flags;
pgprot_t vm_page_prot;
- vm_page_prot = vm_pgprot_modify(vma->vm_page_prot, vm_flags);
+ vm_page_prot = vma_pgprot_modify(vma->vm_page_prot, vma_flags);
if (vma_wants_writenotify(vma, vm_page_prot)) {
- vm_flags &= ~VM_SHARED;
- vm_page_prot = vm_pgprot_modify(vm_page_prot, vm_flags);
+ vma_flags_clear(&vma_flags, VMA_SHARED_BIT);
+ vm_page_prot = vma_pgprot_modify(vm_page_prot, vma_flags);
}
/* remove_protection_ptes reads vma->vm_page_prot without mmap_lock */
WRITE_ONCE(vma->vm_page_prot, vm_page_prot);
--- a/mm/vma.c~mm-vma-convert-vm_pgprot_modify-to-use-vma_flags_t-and-rename
+++ a/mm/vma.c
@@ -2176,7 +2176,7 @@ bool vma_wants_writenotify(struct vm_are
/* The open routine did something to the protections that pgprot_modify
* won't preserve? */
if (pgprot_val(vm_page_prot) !=
- pgprot_val(vm_pgprot_modify(vm_page_prot, vma->vm_flags)))
+ pgprot_val(vma_pgprot_modify(vm_page_prot, vma->flags)))
return false;
/*
--- a/mm/vma.h~mm-vma-convert-vm_pgprot_modify-to-use-vma_flags_t-and-rename
+++ a/mm/vma.h
@@ -541,9 +541,11 @@ static inline bool vma_wants_manual_pte_
}
#ifdef CONFIG_MMU
-static inline pgprot_t vm_pgprot_modify(pgprot_t oldprot, vm_flags_t vm_flags)
+static inline pgprot_t vma_pgprot_modify(pgprot_t oldprot, vma_flags_t vma_flags)
{
- return pgprot_modify(oldprot, vm_get_page_prot(vm_flags));
+ const pgprot_t prot = vma_get_page_prot(vma_flags);
+
+ return pgprot_modify(oldprot, prot);
}
#endif
_
Patches currently in -mm which might be from [email protected] are
x86-mm-pat-acquire-init_mm-write-lock-on-collapse-to-avoid-uaf.patch
x86-mm-pat-acquire-init_mm-read-lock-on-attribute-change-to-avoid-uaf.patch
x86-mm-pat-allocate-split-page-tables-as-kernel-page-tables.patch
mm-vma-introduce-vma-anon-page-offset-field-and-add-helpers.patch
mm-provide-vma_is_cow_mapping-and-remove-is_cow_mapping.patch
mm-introduce-linear_anon_page_index.patch
mm-abstract-vma_address-and-introduce-vma_anon_address.patch
mm-update-print_bad_page_map-to-show-anon-index-if-appropriate.patch
mm-introduce-and-use-vma_filebacked_address.patch
mm-vma-fix-self-merge-check-in-copy_vma.patch
tools-testing-vma-add-tests-for-copy_vma-self-merge.patch
mm-propagate-vma-anonymous-page-offset-on-map-remap-split-merge.patch
mm-rmap-track-whether-the-page-vma-mapped-pgoff-is-anonymous.patch
mm-clean-up-vma_address_end.patch
mm-huge_memory-update-remove_migration_pmd-to-accept-a-folio.patch
mm-migrate-calculate-large-folio-page-index-using-pfn.patch
mm-rmap-use-anon-pgoff-to-track-map_private-file-backed-anon-folios.patch
tools-testing-vma-expand-vma-merge-tests-to-assert-anon-pgoff.patch
tools-testing-selftests-mm-test-anonymous-page-offset-merge-behaviour.patch
mm-vma-only-permit-map_private-dev-zero-to-be-mapped-anonymous.patch
mm-vma-make-map_private-mapped-dev-zero-mappings-truly-anonymous.patch
tools-testing-vma-add-test-to-assert-map_private-dev-zero-is-anon.patch
tools-testing-selftests-mm-add-map_private-dev-zero-merge-tests.patch
mm-add-some-missing-includes-to-mm-local-headers.patch