The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/6] userfaultfd: decouple uffd mode from VMA flags
@ 2026-08-23 12:17 Mike Rapoport (Microsoft)
  2026-08-23 12:17 ` [PATCH 1/6] mm/gup: move gup_can_follow_protnone() to gup.c Mike Rapoport (Microsoft)
                   ` (5 more replies)
  0 siblings, 6 replies; 25+ messages in thread
From: Mike Rapoport (Microsoft) @ 2026-08-23 12:17 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand
  Cc: Baolin Wang, Barry Song, Dev Jain, Hugh Dickins, Jann Horn,
	Jason Gunthorpe, John Hubbard, Jonathan Corbet, Lance Yang,
	Liam R. Howlett, Lorenzo Stoakes, Masami Hiramatsu,
	Mathieu Desnoyers, Mike Rapoport, Michal Hocko, Muchun Song,
	Nico Pache, Oscar Salvador, Pedro Falcato, Peter Xu, Ryan Roberts,
	Shakeel Butt, Shuah Khan, Steven Rostedt, Suren Baghdasaryan,
	Usama Arif, Vlastimil Babka, Zi Yan, linux-doc, linux-fsdevel,
	linux-kernel, linux-mm, linux-trace-kernel

Currently userfault related VMA flags have multiple meanings:
* identify VMAs that are registered with userfaultfd
* and also how exactly VMA is registered with uffd
* and also communicate kind of user fault between the page fault handler
  and handle_userfault()

Introduce an enum for user fault reasons and move the registration mode
into per VMA vm_uffd_state structure today known as vm_userfaultfd_ctx.

---
Mike Rapoport (Microsoft) (6):
      mm/gup: move gup_can_follow_protnone() to gup.c
      userfaultfd: constify VMA parameter of userfaultfd_*() helpers
      userfaultfd: use userfaultfd_*() helpers instead of open coded flag tests
      userfaultfd: rename vm_userfaultfd_ctx to vm_uffd_state
      userfaultfd: decouple fault reason from VMA flags
      userfaultfd: collapse VM_UFFD_{MISSING,WP,MINOR,RWP} into single VM_UFFD

 Documentation/mm/process_addrs.rst |   4 +-
 fs/proc/task_mmu.c                 |  18 +--
 include/linux/mm.h                 | 105 +++--------------
 include/linux/mm_types.h           |  11 +-
 include/linux/pgtable.h            |   4 +-
 include/linux/userfaultfd_k.h      | 155 ++++++++++++++-----------
 include/trace/events/mmflags.h     |  17 +--
 include/uapi/linux/userfaultfd.h   |   6 +-
 mm/gup.c                           |  39 +++++++
 mm/huge_memory.c                   |   6 +-
 mm/hugetlb.c                       |  12 +-
 mm/khugepaged.c                    |   2 +-
 mm/memory.c                        |  16 +--
 mm/mprotect.c                      |   2 +-
 mm/mremap.c                        |   4 +-
 mm/shmem.c                         |   6 +-
 mm/userfaultfd.c                   | 225 +++++++++++++++++++------------------
 mm/vma.c                           |   4 +-
 mm/vma.h                           |   6 +-
 mm/vma_init.c                      |   4 +-
 tools/testing/vma/include/dup.h    |  20 ++--
 tools/testing/vma/include/stubs.h  |   6 +-
 22 files changed, 323 insertions(+), 349 deletions(-)
---
base-commit: 4b2ae13f3393ef4b4bce0021e8762790354f369f
change-id: 20260823-uffd-vm-flags-v1-ee3e131b381d

--
Sincerely yours,
Mike.


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2026-08-25 10:10 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-23 12:17 [PATCH 0/6] userfaultfd: decouple uffd mode from VMA flags Mike Rapoport (Microsoft)
2026-08-23 12:17 ` [PATCH 1/6] mm/gup: move gup_can_follow_protnone() to gup.c Mike Rapoport (Microsoft)
2026-08-23 21:03   ` Barry Song
2026-08-24 14:42   ` David Hildenbrand (Arm)
2026-08-25 10:10     ` Mike Rapoport
2026-08-24 14:59   ` Lorenzo Stoakes (ARM)
2026-08-25  2:03   ` Zi Yan
2026-08-23 12:17 ` [PATCH 2/6] userfaultfd: constify VMA parameter of userfaultfd_*() helpers Mike Rapoport (Microsoft)
2026-08-23 21:03   ` Barry Song
2026-08-24 15:03   ` Lorenzo Stoakes (ARM)
2026-08-25  2:03   ` Zi Yan
2026-08-23 12:17 ` [PATCH 3/6] userfaultfd: use userfaultfd_*() helpers instead of open coded flag tests Mike Rapoport (Microsoft)
2026-08-23 21:14   ` Barry Song
2026-08-24 15:10   ` Lorenzo Stoakes (ARM)
2026-08-23 12:17 ` [PATCH 4/6] userfaultfd: rename vm_userfaultfd_ctx to vm_uffd_state Mike Rapoport (Microsoft)
2026-08-24 14:43   ` David Hildenbrand (Arm)
2026-08-24 15:42   ` Lorenzo Stoakes (ARM)
2026-08-23 12:17 ` [PATCH 5/6] userfaultfd: decouple fault reason from VMA flags Mike Rapoport (Microsoft)
2026-08-24  8:12   ` Muchun Song
2026-08-24 14:46   ` David Hildenbrand (Arm)
2026-08-24 16:28   ` Lorenzo Stoakes (ARM)
2026-08-23 12:17 ` [PATCH 6/6] userfaultfd: collapse VM_UFFD_{MISSING,WP,MINOR,RWP} into single VM_UFFD Mike Rapoport (Microsoft)
2026-08-24  7:11   ` Lance Yang
2026-08-24  8:17     ` Mike Rapoport
2026-08-24  8:27       ` Lance Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox