mm-add-vma_desc_size-vma_desc_pages-helpers.patch removed from -mm tree
The quilt patch titled
Subject: mm: add vma_desc_size(), vma_desc_pages() helpers
has been removed from the -mm tree. Its filename was
mm-add-vma_desc_size-vma_desc_pages-helpers.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: add vma_desc_size(), vma_desc_pages() helpers
Date: Mon, 20 Oct 2025 13:11:21 +0100
It's useful to be able to determine the size of a VMA descriptor range used on f_op->mmap_prepare, expressed both in bytes and pages, so add helpers for both and update code that could make use of it to do so.
---
fs/ntfs3/file.c | 2 +- include/linux/mm.h | 10 ++++++++++ mm/secretmem.c | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-)
fs/ntfs3/file.c renamed from fs/ntfs3/file.c~mm-add-vma_desc_size-vma_desc_pages-helpers +1 -1
@@ -332,7 +332,7 @@ static int ntfs_file_mmap_prepare(structif (rw) {u64 to =min_t (loff_t,i_size_read (inode), - from + desc->end - desc->start); + from +vma_desc_size (desc));if (is_sparsed (ni)) {/* Allocate clusters for rw map. */
include/linux/mm.h renamed from include/linux/mm.h~mm-add-vma_desc_size-vma_desc_pages-helpers +10 -0
@@ -3583,6 +3583,16 @@ static inline unsigned long vma_pages(coreturn (vma->vm_end - vma->vm_start) >>PAGE_SHIFT ; } +static inline unsigned long vma_desc_size (const struct vm_area_desc *desc) +{ +return desc->end - desc->start; +} + +static inline unsigned long vma_desc_pages (const struct vm_area_desc *desc) +{ +return vma_desc_size (desc) >>PAGE_SHIFT ; +} +/* Look up the first VMA which exactly match the interval vm_start ... vm_end */ static inline struct vm_area_struct *find_exact_vma (struct mm_struct *mm,unsigned long vm_start,unsigned long vm_end)
mm/secretmem.c renamed from mm/secretmem.c~mm-add-vma_desc_size-vma_desc_pages-helpers +1 -1
@@ -120,7 +120,7 @@ static int secretmem_release(struct inodstatic int secretmem_mmap_prepare (struct vm_area_desc *desc) { -const unsigned long len = desc->end - desc->start; +const unsigned long len =vma_desc_size (desc);if ((desc->vm_flags & (VM_SHARED |VM_MAYSHARE )) ==0 )return -EINVAL ;
_
Patches currently in -mm which might be from [email protected] are
mm-introduce-vm_maybe_guard-and-make-visible-in-proc-pid-smaps.patch mm-add-atomic-vma-flags-and-set-vm_maybe_guard-as-such.patch mm-add-atomic-vma-flags-and-set-vm_maybe_guard-as-such-fix.patch mm-implement-sticky-vma-flags.patch mm-introduce-copy-on-fork-vmas-and-make-vm_maybe_guard-one.patch mm-set-the-vm_maybe_guard-flag-on-guard-region-install.patch mm-set-the-vm_maybe_guard-flag-on-guard-region-install-fix.patch tools-testing-vma-add-vma-sticky-userland-tests.patch tools-testing-selftests-mm-add-madv_collapse-test-case.patch tools-testing-selftests-mm-add-smaps-visibility-guard-region-test.patch mm-correctly-handle-uffd-pte-markers.patch mm-introduce-leaf-entry-type-and-use-to-simplify-leaf-entry-logic.patch mm-avoid-unnecessary-uses-of-is_swap_pte.patch mm-eliminate-is_swap_pte-when-softleaf_from_pte-suffices.patch mm-use-leaf-entries-in-debug-pgtable-remove-is_swap_pte.patch fs-proc-task_mmu-refactor-pagemap_pmd_range.patch mm-avoid-unnecessary-use-of-is_swap_pmd.patch mm-huge_memory-refactor-copy_huge_pmd-non-present-logic.patch mm-huge_memory-refactor-change_huge_pmd-non-present-logic.patch mm-replace-pmd_to_swp_entry-with-softleaf_from_pmd.patch mm-introduce-pmd_is_huge-and-use-where-appropriate.patch mm-remove-remaining-is_swap_pmd-users-and-is_swap_pmd.patch mm-remove-non_swap_entry-and-use-softleaf-helpers-instead.patch mm-remove-is_hugetlb_entry_.patch mm-eliminate-further-swapops-predicates.patch mm-replace-remaining-pte_to_swp_entry-with-softleaf_from_pte.patch mm-rename-walk_page_range_mm.patch mm-madvise-allow-guard-page-install-remove-under-vma-lock.patch mm-propagate-vm_softdirty-on-merge.patch testing-selftests-mm-add-soft-dirty-merge-self-test.patch mm-declare-vma-flags-by-bit.patch mm-declare-vma-flags-by-bit-fix.patch mm-declare-vma-flags-by-bit-fix-2.patch mm-simplify-and-rename-mm-flags-function-for-clarity.patch tools-testing-vma-eliminate-dependency-on-vma-__vm_flags.patch mm-introduce-vma-flags-bitmap-type.patch