From: Alejandro Colomar <alx@kernel.org>
To: Kiryl Shutsemau <kirill@shutemov.name>
Cc: linux-man@vger.kernel.org, linux-mm@kvack.org,
akpm@linux-foundation.org, rppt@kernel.org, peterx@redhat.com,
david@kernel.org, kernel-team@meta.com,
Kiryl Shutsemau <kas@kernel.org>
Subject: Re: [PATCH v2 5/6] UFFDIO_REGISTER.2const: Document UFFDIO_REGISTER_MODE_RWP and 1 << _UFFDIO_RWPROTECT
Date: Thu, 4 Jun 2026 01:46:54 +0200 [thread overview]
Message-ID: <aiC84ZUEr3MwWuq5@devuan> (raw)
In-Reply-To: <20260526134149.2831720-6-kirill@shutemov.name>
[-- Attachment #1: Type: text/plain, Size: 2566 bytes --]
On 2026-05-26T14:41:48+0100, Kiryl Shutsemau wrote:
> 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 <kas@kernel.org>
> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Patch applied; thanks!
Cheers,
Alex
> ---
> man/man2const/UFFDIO_REGISTER.2const | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/man/man2const/UFFDIO_REGISTER.2const b/man/man2const/UFFDIO_REGISTER.2const
> index 50064c954b81..ded57cf301ad 100644
> --- a/man/man2const/UFFDIO_REGISTER.2const
> +++ b/man/man2const/UFFDIO_REGISTER.2const
> @@ -72,6 +72,20 @@ .SH DESCRIPTION
> 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 page present 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 fails with
> +.BR EINVAL .
> +Anonymous, shmem, and hugetlbfs ranges are compatible.
> .P
> If the operation is successful, the kernel modifies the
> .I argp->ioctls
> @@ -109,6 +123,16 @@ .SH DESCRIPTION
> 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
>
>
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-06-03 23:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 13:41 [PATCH man-pages v2 0/6] userfaultfd: document read-write-protect mode Kiryl Shutsemau
2026-05-26 13:41 ` [PATCH v2 1/6] userfaultfd.2: Add " Kiryl Shutsemau
2026-05-27 23:36 ` Alejandro Colomar
2026-05-26 13:41 ` [PATCH v2 2/6] UFFDIO_RWPROTECT.2const: New page Kiryl Shutsemau
2026-05-28 11:35 ` Alejandro Colomar
2026-05-26 13:41 ` [PATCH v2 3/6] UFFDIO_SET_MODE.2const: " Kiryl Shutsemau
2026-05-28 11:48 ` Alejandro Colomar
2026-05-26 13:41 ` [PATCH v2 4/6] UFFDIO_API.2const: Document UFFD_FEATURE_RWP{,_ASYNC} and 1 << _UFFDIO_SET_MODE Kiryl Shutsemau
2026-06-03 23:43 ` Alejandro Colomar
2026-05-26 13:41 ` [PATCH v2 5/6] UFFDIO_REGISTER.2const: Document UFFDIO_REGISTER_MODE_RWP and 1 << _UFFDIO_RWPROTECT Kiryl Shutsemau
2026-06-03 23:46 ` Alejandro Colomar [this message]
2026-05-26 13:41 ` [PATCH v2 6/6] ioctl_userfaultfd.2: Reference UFFDIO_RWPROTECT and UFFDIO_SET_MODE Kiryl Shutsemau
2026-06-03 23:47 ` Alejandro Colomar
2026-06-04 12:08 ` Kiryl Shutsemau
2026-06-04 12:14 ` Alejandro Colomar
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=aiC84ZUEr3MwWuq5@devuan \
--to=alx@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=kas@kernel.org \
--cc=kernel-team@meta.com \
--cc=kirill@shutemov.name \
--cc=linux-man@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=rppt@kernel.org \
/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