linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] mm/process_vm_access: pidfd and nowait support for process_vm_readv/writev
@ 2026-04-08 14:54 Alban Crequy
  2026-04-08 14:54 ` [PATCH v2 1/2] " Alban Crequy
  2026-04-08 14:54 ` [PATCH v2 2/2] selftests/mm: add tests for process_vm_readv flags Alban Crequy
  0 siblings, 2 replies; 3+ messages in thread
From: Alban Crequy @ 2026-04-08 14:54 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand, Christian Brauner
  Cc: Lorenzo Stoakes, Liam R . Howlett, Vlastimil Babka,
	Mike Rapoport, Suren Baghdasaryan, Michal Hocko, linux-kernel,
	linux-mm, Alban Crequy, Alban Crequy, Peter Xu, Willy Tarreau,
	linux-kselftest, shuah

This adds two flags to process_vm_readv/writev:

- PROCESS_VM_PIDFD: refer to the remote process via PID file descriptor
  instead of PID.
- PROCESS_VM_NOWAIT: do not block on IO if the memory access causes a
  page fault.

v1: https://lore.kernel.org/lkml/20251118132348.2415603-1-alban.crequy@gmail.com/

Changes since v1:
- Expand commit message with use-case motivation (David Hildenbrand)
- Use unsigned long consistently for pvm_flags parameter (David Hildenbrand)
- Add PROCESS_VM_SUPPORTED_FLAGS kernel-internal define (David Hildenbrand)
- Keep (1UL << N) in UAPI header: BIT() is defined in vdso/bits.h
  which is not exported to userspace, so UAPI headers using BIT() would
  break when included from userspace programs (David Hildenbrand)
- Add selftests (new patch 2/2)

Alban Crequy (2):
  mm/process_vm_access: pidfd and nowait support for
    process_vm_readv/writev
  selftests/mm: add tests for process_vm_readv flags

 MAINTAINERS                                   |   1 +
 include/uapi/linux/process_vm.h               |   9 +
 mm/process_vm_access.c                        |  24 +-
 tools/testing/selftests/mm/Makefile           |   1 +
 tools/testing/selftests/mm/process_vm_readv.c | 368 ++++++++++++++++++
 5 files changed, 397 insertions(+), 6 deletions(-)
 create mode 100644 include/uapi/linux/process_vm.h
 create mode 100644 tools/testing/selftests/mm/process_vm_readv.c

-- 
2.45.0



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

end of thread, other threads:[~2026-04-08 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-08 14:54 [PATCH v2 0/2] mm/process_vm_access: pidfd and nowait support for process_vm_readv/writev Alban Crequy
2026-04-08 14:54 ` [PATCH v2 1/2] " Alban Crequy
2026-04-08 14:54 ` [PATCH v2 2/2] selftests/mm: add tests for process_vm_readv flags Alban Crequy

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