]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm: update core kernel code to use vm_flags_t consistently
authorLorenzo Stoakes <lorenzo.stoakes@oracle.com>
Wed, 18 Jun 2025 19:42:53 +0000 (20:42 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 10 Jul 2025 05:42:13 +0000 (22:42 -0700)
commitbfbe71109fa40e8cc05a0f99e6734b7d76ee00b0
tree9a02712343f1715fc3706784632bead7296057d3
parent78ddaa358ec4cdd60bd0e243ced1c83a52c30241
mm: update core kernel code to use vm_flags_t consistently

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.

Link: https://lkml.kernel.org/r/d1588e7bb96d1ea3fe7b9df2c699d5b4592d901d.1750274467.git.lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Acked-by: Kees Cook <kees@kernel.org>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: Jan Kara <jack@suse.cz>
Acked-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Oscar Salvador <osalvador@suse.de>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Acked-by: Zi Yan <ziy@nvidia.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Jann Horn <jannh@google.com>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
38 files changed:
fs/exec.c
fs/userfaultfd.c
include/linux/coredump.h
include/linux/huge_mm.h
include/linux/khugepaged.h
include/linux/ksm.h
include/linux/memfd.h
include/linux/mm.h
include/linux/mm_types.h
include/linux/mman.h
include/linux/rmap.h
include/linux/userfaultfd_k.h
include/trace/events/fs_dax.h
mm/debug.c
mm/execmem.c
mm/filemap.c
mm/gup.c
mm/huge_memory.c
mm/hugetlb.c
mm/internal.h
mm/khugepaged.c
mm/ksm.c
mm/madvise.c
mm/mapping_dirty_helpers.c
mm/memfd.c
mm/memory.c
mm/mmap.c
mm/mprotect.c
mm/mremap.c
mm/nommu.c
mm/rmap.c
mm/shmem.c
mm/userfaultfd.c
mm/vma.c
mm/vma.h
mm/vmscan.c
tools/testing/vma/vma.c
tools/testing/vma/vma_internal.h