tools-testing-vma-fix-vma-flag-tests.patch removed from -mm tree
The quilt patch titled
Subject: tools/testing/vma: fix VMA flag tests
has been removed from the -mm tree. Its filename was
tools-testing-vma-fix-vma-flag-tests.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 (Oracle)" <[email protected]>
Subject: tools/testing/vma: fix VMA flag tests
Date: Fri, 20 Mar 2026 19:38:23 +0000
The VMA tests are incorrectly referencing NUM_VMA_FLAGS, which doesn't exist, rather they should reference NUM_VMA_FLAG_BITS.
Additionally, remove the custom-written implementation of __mk_vma_flags() as this means we are not testing the code as present in the kernel, rather add the actual __mk_vma_flags() to dup.h and add #ifdef's to handle declarations differently depending on NUM_VMA_FLAG_BITS.
---
tools/testing/vma/include/custom.h | 19 ----- tools/testing/vma/include/dup.h | 21 +++++- tools/testing/vma/tests/vma.c | 88 ++++++++++++++++++++++----- 3 files changed, 92 insertions(+), 36 deletions(-)
tools/testing/vma/include/custom.h renamed from tools/testing/vma/include/custom.h~tools-testing-vma-fix-vma-flag-tests +0 -19
@@ -29,8 +29,6 @@ extern unsigned long dac_mmap_min_addr;*/ #define pr_warn_once pr_err -#define pgtable_supports_soft_dirty () 1 -struct anon_vma {struct anon_vma *root;struct rb_root_cached rb_root;
@@ -99,23 +97,6 @@ static inline void vma_lock_init(structrefcount_set (&vma->vm_refcnt,0 ); } -static __always_inline vma_flags_t __mk_vma_flags(size_t count, -const vma_flag_t *bits) -{ -vma_flags_t flags; -int i; - -/* -* For testing purposes: allow invalid bit specification so we can -* easily test. -*/ -vma_flags_clear_all (&flags); -for (i =0 ; i < count; i++) -if (bits[i] <NUM_VMA_FLAG_BITS ) -vma_flags_set_flag (&flags, bits[i]); -return flags; -} -static inline unsigned long vma_kernel_pagesize (struct vm_area_struct *vma) {return PAGE_SIZE ;
tools/testing/vma/include/dup.h renamed from tools/testing/vma/include/dup.h~tools-testing-vma-fix-vma-flag-tests +18 -3
@@ -854,10 +854,21 @@ static inline void vm_flags_clear(structvma_flags_clear_word (&vma->flags, flags); } -static inline vma_flags_t __mk_vma_flags (size_t count,const vma_flag_t *bits); +static __always_inline vma_flags_t __mk_vma_flags(size_t count, +const vma_flag_t *bits) +{ +vma_flags_t flags; +int i; + +vma_flags_clear_all (&flags); +for (i =0 ; i < count; i++) +vma_flags_set_flag (&flags, bits[i]); -#define mk_vma_flags (...) __mk_vma_flags(COUNT_ARGS(__VA_ARGS__), \ - (const vma_flag_t []){__VA_ARGS__}) +return flags; +} + +#define mk_vma_flags (...) __mk_vma_flags(COUNT_ARGS(__VA_ARGS__), \ + (const vma_flag_t []){__VA_ARGS__}) static __always_inline bool vma_flags_test(const vma_flags_t *flags,vma_flag_t bit)
@@ -1390,3 +1401,7 @@ static inline int get_sysctl_max_map_cou {return READ_ONCE (sysctl_max_map_count); } + +#ifndef pgtable_supports_soft_dirty +#define pgtable_supports_soft_dirty () IS_ENABLED(CONFIG_MEM_SOFT_DIRTY) +#endif
tools/testing/vma/tests/vma.c renamed from tools/testing/vma/tests/vma.c~tools-testing-vma-fix-vma-flag-tests +74 -14
212 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
maintainers-update-mglru-entry-to-reflect-current-status.patch selftests-mm-add-merge-test-for-partial-msealed-range.patch