Re: [PATCH 2/3] mm: update core kernel code to use vm_flags_t consistently
From: Zi Yan
Date: Mon Jun 23 2025 - 10:34:41 EST
On 18 Jun 2025, at 15:42, Lorenzo Stoakes wrote:
> The core kernel code is currently very inconsistent in its use of
> vm_flags_t vs. unsigned long. This prevents us from changing the type of
> vm_flags_t in the future and is simply not correct, so correct this.
>
> While this results in rather a lot of churn, it is a critical pre-requisite
> for a future planned change to VMA flag type.
>
> Additionally, update VMA userland tests to account for the changes.
>
> To make review easier and to break things into smaller parts, driver and
> architecture-specific changes is left for a subsequent commit.
>
> The code has been adjusted to cascade the changes across all calling code
> as far as is needed.
>
> We will adjust architecture-specific and driver code in a subsequent patch.
>
> Overall, this patch does not introduce any functional change.
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
> ---
> fs/exec.c | 2 +-
> fs/userfaultfd.c | 2 +-
> include/linux/coredump.h | 2 +-
> include/linux/huge_mm.h | 12 +-
> include/linux/khugepaged.h | 4 +-
> include/linux/ksm.h | 4 +-
> include/linux/memfd.h | 4 +-
> include/linux/mm.h | 6 +-
> include/linux/mm_types.h | 2 +-
> include/linux/mman.h | 4 +-
> include/linux/rmap.h | 4 +-
> include/linux/userfaultfd_k.h | 4 +-
> include/trace/events/fs_dax.h | 6 +-
> mm/debug.c | 2 +-
> mm/execmem.c | 8 +-
> mm/filemap.c | 2 +-
> mm/gup.c | 2 +-
> mm/huge_memory.c | 2 +-
> mm/hugetlb.c | 4 +-
> mm/internal.h | 4 +-
> mm/khugepaged.c | 4 +-
> mm/ksm.c | 2 +-
> mm/madvise.c | 4 +-
> mm/mapping_dirty_helpers.c | 2 +-
> mm/memfd.c | 8 +-
> mm/memory.c | 4 +-
> mm/mmap.c | 16 +-
> mm/mprotect.c | 8 +-
> mm/mremap.c | 2 +-
> mm/nommu.c | 12 +-
> mm/rmap.c | 4 +-
> mm/shmem.c | 6 +-
> mm/userfaultfd.c | 14 +-
> mm/vma.c | 78 ++++-----
> mm/vma.h | 16 +-
> mm/vmscan.c | 4 +-
> tools/testing/vma/vma.c | 266 +++++++++++++++----------------
> tools/testing/vma/vma_internal.h | 8 +-
> 38 files changed, 269 insertions(+), 269 deletions(-)
>
Acked-by: Zi Yan <ziy@xxxxxxxxxx>
--
Best Regards,
Yan, Zi