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 man-pages v1 4/6] UFFDIO_API.2const: Document UFFD_FEATURE_RWP{,_ASYNC} and 1 << _UFFDIO_SET_MODE
Date: Mon, 25 May 2026 16:03:51 +0200 [thread overview]
Message-ID: <ahRWqj2BbBGL6wYD@devuan> (raw)
In-Reply-To: <ahRV5sZCUXVQ_fBs@devuan>
[-- Attachment #1: Type: text/plain, Size: 3171 bytes --]
On 2026-05-25T16:00:37+0200, Alejandro Colomar wrote:
> Hi Kiryl,
>
> On 2026-05-25T13:28:14+0100, Kiryl Shutsemau wrote:
> > Add the two RWP feature bits introduced in Linux 7.2:
> >
> > UFFD_FEATURE_RWP gates UFFDIO_REGISTER_MODE_RWP and the
> > UFFDIO_RWPROTECT(2const) ioctl.
> > UFFD_FEATURE_RWP_ASYNC in-kernel resolution of RWP faults without
> > delivering a notification; requires
> > UFFD_FEATURE_RWP to be set in the same
> > UFFDIO_API call.
> >
> > Also document 1 << _UFFDIO_SET_MODE in argp->ioctls, the
> > file-descriptor-level bit that advertises UFFDIO_SET_MODE(2const) for
> > toggling UFFD_FEATURE_RWP_ASYNC at runtime; it is independent of any
> > registered range.
>
> Would you mind separating these into 3 patches? Thanks!
Actually, I retire this. I think it makes sense as a single patch.
Cheers,
Alex
>
> >
> > The existing page intro already describes UFFDIO_API returning EINVAL
> > on unsupported feature bits and the temporary-uffd probe pattern, so
> > the new TP entries do not re-state that.
> >
> > Signed-off-by: Kiryl Shutsemau <kas@kernel.org>
>
>
> Have a lovely day!
> Alex
>
> > ---
> > man/man2const/UFFDIO_API.2const | 29 +++++++++++++++++++++++++++++
> > 1 file changed, 29 insertions(+)
> >
> > diff --git a/man/man2const/UFFDIO_API.2const b/man/man2const/UFFDIO_API.2const
> > index e894114bb8e2..d2819f009f97 100644
> > --- a/man/man2const/UFFDIO_API.2const
> > +++ b/man/man2const/UFFDIO_API.2const
> > @@ -213,6 +213,28 @@ If this feature bit is set,
> > the kernel supports resolving faults with the
> > .B UFFDIO_MOVE
> > ioctl.
> > +.TP
> > +.BR UFFD_FEATURE_RWP " (since Linux 7.2)"
> > +If this feature bit is set,
> > +the kernel supports read-write protection tracking, and the
> > +.B UFFDIO_REGISTER_MODE_RWP
> > +registration mode and the
> > +.B UFFDIO_RWPROTECT
> > +ioctl become available.
> > +.TP
> > +.BR UFFD_FEATURE_RWP_ASYNC " (since Linux 7.2)"
> > +If this feature bit is set,
> > +the kernel will resolve read-write protect faults in place without
> > +delivering a notification, automatically restoring page permissions and
> > +letting the faulted thread continue.
> > +This bit requires
> > +.B UFFD_FEATURE_RWP
> > +to be set in the same
> > +.B UFFDIO_API
> > +call.
> > +The async mode can also be toggled at runtime using the
> > +.BR UFFDIO_SET_MODE (2const)
> > +ioctl.
> > .P
> > The returned
> > .I argp->ioctls
> > @@ -234,6 +256,13 @@ operation is supported.
> > The
> > .B UFFDIO_UNREGISTER
> > operation is supported.
> > +.TP
> > +.BR "1 << _UFFDIO_SET_MODE" " (since Linux 7.2)"
> > +The
> > +.B UFFDIO_SET_MODE
> > +operation is supported.
> > +This is a file-descriptor-level ioctl and is reported once per
> > +userfaultfd, independent of any registered range.
> > .SH RETURN VALUE
> > On success,
> > 0 is returned.
> > --
> > 2.54.0
> >
> >
>
> --
> <https://www.alejandro-colomar.es>
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-05-25 14:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 12:28 [PATCH man-pages v1 0/6] userfaultfd: document read-write protect mode Kiryl Shutsemau
2026-05-25 12:28 ` [PATCH man-pages v1 1/6] userfaultfd.2: Add " Kiryl Shutsemau
2026-05-25 13:53 ` Alejandro Colomar
2026-05-25 12:28 ` [PATCH man-pages v1 2/6] UFFDIO_RWPROTECT.2const: New page Kiryl Shutsemau
2026-05-25 12:28 ` [PATCH man-pages v1 3/6] UFFDIO_SET_MODE.2const: " Kiryl Shutsemau
2026-05-25 12:28 ` [PATCH man-pages v1 4/6] UFFDIO_API.2const: Document UFFD_FEATURE_RWP{,_ASYNC} and 1 << _UFFDIO_SET_MODE Kiryl Shutsemau
2026-05-25 14:00 ` Alejandro Colomar
2026-05-25 14:03 ` Alejandro Colomar [this message]
2026-05-25 12:28 ` [PATCH man-pages v1 5/6] UFFDIO_REGISTER.2const: Document UFFDIO_REGISTER_MODE_RWP and 1 << _UFFDIO_RWPROTECT Kiryl Shutsemau
2026-05-25 12:28 ` [PATCH man-pages v1 6/6] ioctl_userfaultfd.2: Reference UFFDIO_RWPROTECT and UFFDIO_SET_MODE Kiryl Shutsemau
2026-05-26 9:30 ` [PATCH man-pages v1 0/6] userfaultfd: document read-write protect mode Mike Rapoport
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=ahRWqj2BbBGL6wYD@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