Re: [PATCH man-pages v1 4/6] UFFDIO_API.2const: Document UFFD_FEATURE_RWP{,_ASYNC} and 1 << _UFFDIO_SET_MODE
Alejandro Colomar <[email protected]> Mon, 25 May 2026 16:03:51 +0200
| Newsgroups | org.kernel.vger.linux-man,org.kvack.linux-mm |
|---|---|
| Message-ID | <ahRWqj2BbBGL6wYD@devuan> |
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 <[email protected]> > > > 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>
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmoUVscACgkQ64mZXMKQ wqlYNA/9EUn3OCwR6YmzZ3ps6W0TW+xsLs4Rbb9gk+093unhjHyuVe3b/DxYvrm+ s2TT+4Y3UckxORNPcUE01i72H2+CA3L34Q6QRhRlPJZxb3cvqjcUwpfsngYaoJqE hhx/X6XgaOq6wYJWX3ZUUkm35fdC2VKO4gfNIMQvr9DbiI1iqqspAsPYM+5A5WKn bfJ9vH3uNMqmLbvGpRbE37PhNsTMDmC/dra+NzusvNRJgy8voO24pe4YiAJ6wZ8i GlQGKt/Larw3W7VHBU7jiCrj8iZI/XMbrtEIGgixH0EWJ1+Z5mEvobcQ8C8/0HNq dZgug3g5aq24FoUViItQJGj8x0VuIacmKyDkZdZ5z6sxK+ecMU4somzER9dczoHV BazpNaa59qUUEnIuY5yZNQLz2rJCYjhKuYnrk5U4dIaO4G67YG3LFSBGKzecx3rH XSxHutsSWuQKvDcd2L+Cpj8msvUkeAbmJDaK5RA6R3DRj4UnTga0XidFQN/WU9gW OaP4RzDb78mnJMa8y2XWAaQlEkDqEwjbN1DEprDnCtYqG5L7vk1o0fPfXu7kANfE BbsG/WeeZLSAasGI9y1fSaXMEgTW77fZg12cOKwPUgmtLW6MQFcHp5MDv7YMAqFi lDCrmuNPiU9cOI0P7gPd8P6sQhvA36nIfc5i7a1oVn8hMrX9r50= =oeED -----END PGP SIGNATURE-----