[PATCH man-pages v1 5/6] UFFDIO_REGISTER.2const: Document UFFDIO_REGISTER_MODE_RWP and 1 << _UFFDIO_RWPROTECT
Kiryl Shutsemau <[email protected]> Mon, 25 May 2026 13:28:15 +0100
| Newsgroups | org.kernel.vger.linux-man,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
Add the new registration mode bit introduced in Linux 7.2:
UFFDIO_REGISTER_MODE_RWP Track every access (read or write) to a
present page in the registered range.
Cannot be combined with
UFFDIO_REGISTER_MODE_WP; both modes share
the same per-PTE marker bit. Anonymous,
shmem, and hugetlbfs ranges are
compatible.
Also document the matching argp->ioctls bit, 1 << _UFFDIO_RWPROTECT,
which the kernel reports only when the range was registered with
UFFDIO_REGISTER_MODE_RWP (which itself requires UFFD_FEATURE_RWP to
have been negotiated).
Signed-off-by: Kiryl Shutsemau <[email protected]>
---
man/man2const/UFFDIO_REGISTER.2const | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/man/man2const/UFFDIO_REGISTER.2const b/man/man2const/UFFDIO_REGISTER.2const
index 50064c954b81..07b2a1c9dfc5 100644
--- a/man/man2const/UFFDIO_REGISTER.2const
+++ b/man/man2const/UFFDIO_REGISTER.2const
@@ -72,6 +72,17 @@ Since Linux 5.13,
only hugetlbfs ranges are compatible.
Since Linux 5.14,
compatibility with shmem ranges was added.
+.TP
+.BR UFFDIO_REGISTER_MODE_RWP " (since Linux 7.2)"
+Track page faults on read-write-protected pages.
+Every access (read or write) to a present page within the registered
+range generates a notification once the range has been protected with
+.BR UFFDIO_RWPROTECT (2const).
+This mode cannot be combined with
+.BR UFFDIO_REGISTER_MODE_WP ;
+attempting to do so returns
+.BR EINVAL .
+Anonymous, shmem, and hugetlbfs ranges are compatible.
.P
If the operation is successful, the kernel modifies the
.I argp->ioctls
@@ -109,6 +120,16 @@ operation is supported.
The
.B UFFDIO_POISON
operation is supported.
+.TP
+.BR "1 << _UFFDIO_RWPROTECT" " (since Linux 7.2)"
+The
+.B UFFDIO_RWPROTECT
+operation is supported.
+This bit is reported only when the range was registered with
+.B UFFDIO_REGISTER_MODE_RWP
+(which itself requires
+.B UFFD_FEATURE_RWP
+to have been negotiated).
.SH RETURN VALUE
On success,
0 is returned.
--
2.54.0