Continue the conversion of legacy vm_flags_t flags to the new vma_flags_t
bitmap type.

Do some more core mm conversion (we really should be the first to
completely move to the new scheme :), but also update some mm-adjacent and
otherwise straightforward cases - /proc/$pid/maps and friends, the coredump
VMA dump size logic, uprobes, perf and LSM mmap/mprotect hooks.

This series only makes strictly mechanical changes to keep things gentle
during this very busy cycle.

No functional change intended.

Build tested on x86-64 (allmodconfig, each patch individually), i386,
arm64, riscv nommu and ppc64le.

Signed-off-by: Lorenzo Stoakes (ARM) <[email protected]>
---
v2:
* Dropped what were 1/13, 3/13, 4/13, 5/13 and 6/13, as David has taken
  these through mm/core.git.
* Rebased on mm-new.
* Updated 1/11 (was 2/13) to read VMA_RAND_READ_BIT before
  maybe_unlock_mmap_for_io() can release the fault lock, avoiding a
  use-after-free of the VMA, and to remove the now-shadowing inner VMA
  declaration, as per Sashiko and Andrew.
* Updated 2/11 (was 7/13) to drop an unrelated whitespace change in
  mm/ksm.c and to fix up the indentation of touched lines, as per David.
* Updated 3/11 (was 8/13) to retain the shadow stack check since added to
  hmm_vma_walk_test().
* Updated 4/11 (was 9/13) commit message to note that the soft-dirty
  assert in vm_flags_clear() is intentionally dropped, as per Lance.
* Split what was 13/13 into per-LSM patches 8/11 to 11/11, as per Paul.
* Propagated tags, thanks everyone!

v1:
https://lore.kernel.org/r/[email protected]

---
Lorenzo Stoakes (ARM) (11):
      mm/filemap: convert fault and readahead logic to use vma_flags_t
      mm/madvise: convert madvise_vma_behavior() to use vma_flags_t
      mm: convert miscellaneous VMA flag tests to use vma_flags_t
      fs/proc/task_mmu: convert VMA flag tests to use vma_flags_t
      fs/coredump: convert vma_dump_size() to use vma_flags_t
      uprobes: convert VMA flag tests to use vma_flags_t
      perf: convert VMA flag tests to use vma_flags_t
      selinux: convert VMA flag tests to use vma_flags_t
      apparmor: convert VMA flag tests to use vma_flags_t
      ima: convert VMA flag tests to use vma_flags_t
      ipe: convert VMA flag tests to use vma_flags_t

 arch/powerpc/kvm/book3s_hv_uvmem.c | 10 ++++----
 fs/coredump.c                      | 16 ++++++-------
 fs/proc/task_mmu.c                 | 43 +++++++++++++++++----------------
 include/linux/huge_mm.h            |  4 ++--
 include/linux/ksm.h                |  4 ++--
 include/linux/mm_inline.h          |  2 +-
 kernel/events/core.c               | 26 ++++++++++----------
 kernel/events/uprobes.c            | 12 ++++++----
 lib/test_hmm.c                     |  4 ++--
 mm/damon/vaddr.c                   |  2 +-
 mm/filemap.c                       | 26 ++++++++++----------
 mm/hmm.c                           |  6 ++---
 mm/internal.h                      |  2 +-
 mm/khugepaged.c                    | 10 ++++----
 mm/ksm.c                           |  8 +++----
 mm/madvise.c                       | 49 ++++++++++++++++++++------------------
 mm/mempolicy.c                     |  4 ++--
 mm/mmap_lock.c                     |  4 ++--
 mm/mremap.c                        |  2 +-
 mm/msync.c                         |  4 ++--
 mm/oom_kill.c                      |  4 ++--
 mm/pagewalk.c                      |  2 +-
 mm/vma.h                           |  4 ++--
 security/apparmor/lsm.c            |  2 +-
 security/integrity/ima/ima_main.c  |  2 +-
 security/ipe/hooks.c               |  2 +-
 security/selinux/hooks.c           | 14 +++++------
 27 files changed, 139 insertions(+), 129 deletions(-)
---
base-commit: 5bd93e4b0b357e9d0a13199887aacbf04d1ce216
change-id: 20261101-late-2026-vma-flags-461731a636c3

Cheers,
-- 
Lorenzo Stoakes (ARM) <[email protected]>


Reply via email to