From: Alban Crequy <alban.crequy@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Christian Brauner <brauner@kernel.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>,
"Liam R . Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Alban Crequy <alban.crequy@gmail.com>,
Alban Crequy <albancrequy@microsoft.com>,
Peter Xu <peterx@redhat.com>, Willy Tarreau <w@1wt.eu>,
linux-kselftest@vger.kernel.org, shuah@kernel.org
Subject: [PATCH v2 0/2] mm/process_vm_access: pidfd and nowait support for process_vm_readv/writev
Date: Wed, 8 Apr 2026 16:54:34 +0200 [thread overview]
Message-ID: <20260408145436.843538-1-alban.crequy@gmail.com> (raw)
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
next reply other threads:[~2026-04-08 14:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 14:54 Alban Crequy [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260408145436.843538-1-alban.crequy@gmail.com \
--to=alban.crequy@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=albancrequy@microsoft.com \
--cc=brauner@kernel.org \
--cc=david@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=peterx@redhat.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox