* [PATCH] ioctl_userfaultfd.2: Corrections for returned .ioctls members
@ 2022-03-18 19:13 Ian Abbott
2022-03-21 6:10 ` Peter Xu
0 siblings, 1 reply; 6+ messages in thread
From: Ian Abbott @ 2022-03-18 19:13 UTC (permalink / raw)
To: linux-man
Cc: Alejandro Colomar, Michael Kerrisk, Peter Xu, linux-kernel, Ian Abbott
Support for the `UFFDIO_WRITEPROTECT` operation is not indicated in the
`ioctls` member of `struct uffdio_api`. It is indicated in the `ioctls`
member of `struct uffdio_register` along with indications of support for
the `UFFDIO_COPY`, `UFFDIO_WAKE` and `UFFDIO_ZEROPAGE` operations (and
also the `UFFDIO_CONTINUE` operation supported since Linux 5.13 but
that is not documented by this man page yet.)
Fixes: f559fa36a678 ("ioctl_userfaultfd.2: Add write-protect mode docs")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
man2/ioctl_userfaultfd.2 | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2
index 504f61d4b..e930af520 100644
--- a/man2/ioctl_userfaultfd.2
+++ b/man2/ioctl_userfaultfd.2
@@ -235,11 +235,6 @@ operation is supported.
The
.B UFFDIO_UNREGISTER
operation is supported.
-.TP
-.B 1 << _UFFDIO_WRITEPROTECT
-The
-.B UFFDIO_WRITEPROTECT
-operation is supported.
.PP
This
.BR ioctl (2)
@@ -333,8 +328,26 @@ If the operation is successful, the kernel modifies the
bit-mask field to indicate which
.BR ioctl (2)
operations are available for the specified range.
-This returned bit mask is as for
-.BR UFFDIO_API .
+This returned bit mask can contain the following bits:
+.TP
+.B 1 << _UFFDIO_COPY
+The
+.B UFFDIO_COPY
+operation is supported.
+.TP
+.B 1 << _UFFDIO_WAKE
+The
+.B UFFDIO_WAKE
+operation is supported.
+.TP
+.B 1 << _UFFDIO_WRITEPROTECT
+The
+.B UFFDIO_WRITEPROTECT
+.TP
+.B 1 << _UFFDIO_ZEROPAGE
+The
+.B UFFDIO_ZEROPAGE
+operation is supported.
.PP
This
.BR ioctl (2)
--
2.35.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ioctl_userfaultfd.2: Corrections for returned .ioctls members
2022-03-18 19:13 [PATCH] ioctl_userfaultfd.2: Corrections for returned .ioctls members Ian Abbott
@ 2022-03-21 6:10 ` Peter Xu
2022-03-22 12:32 ` Alejandro Colomar (man-pages)
0 siblings, 1 reply; 6+ messages in thread
From: Peter Xu @ 2022-03-21 6:10 UTC (permalink / raw)
To: Ian Abbott
Cc: linux-man, Alejandro Colomar, Michael Kerrisk, linux-kernel,
Axel Rasmussen
On Fri, Mar 18, 2022 at 07:13:43PM +0000, Ian Abbott wrote:
> Support for the `UFFDIO_WRITEPROTECT` operation is not indicated in the
> `ioctls` member of `struct uffdio_api`. It is indicated in the `ioctls`
> member of `struct uffdio_register` along with indications of support for
> the `UFFDIO_COPY`, `UFFDIO_WAKE` and `UFFDIO_ZEROPAGE` operations (and
> also the `UFFDIO_CONTINUE` operation supported since Linux 5.13 but
> that is not documented by this man page yet.)
I thought it should have landed but indeed it's not. Copying Axel.
>
> Fixes: f559fa36a678 ("ioctl_userfaultfd.2: Add write-protect mode docs")
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
The patch looks correct to me, thanks for fixing it.
Acked-by: Peter Xu <peterx@redhat.com>
> ---
> man2/ioctl_userfaultfd.2 | 27 ++++++++++++++++++++-------
> 1 file changed, 20 insertions(+), 7 deletions(-)
>
> diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2
> index 504f61d4b..e930af520 100644
> --- a/man2/ioctl_userfaultfd.2
> +++ b/man2/ioctl_userfaultfd.2
> @@ -235,11 +235,6 @@ operation is supported.
> The
> .B UFFDIO_UNREGISTER
> operation is supported.
> -.TP
> -.B 1 << _UFFDIO_WRITEPROTECT
> -The
> -.B UFFDIO_WRITEPROTECT
> -operation is supported.
> .PP
> This
> .BR ioctl (2)
> @@ -333,8 +328,26 @@ If the operation is successful, the kernel modifies the
> bit-mask field to indicate which
> .BR ioctl (2)
> operations are available for the specified range.
> -This returned bit mask is as for
> -.BR UFFDIO_API .
> +This returned bit mask can contain the following bits:
> +.TP
> +.B 1 << _UFFDIO_COPY
> +The
> +.B UFFDIO_COPY
> +operation is supported.
> +.TP
> +.B 1 << _UFFDIO_WAKE
> +The
> +.B UFFDIO_WAKE
> +operation is supported.
> +.TP
> +.B 1 << _UFFDIO_WRITEPROTECT
> +The
> +.B UFFDIO_WRITEPROTECT
> +.TP
> +.B 1 << _UFFDIO_ZEROPAGE
> +The
> +.B UFFDIO_ZEROPAGE
> +operation is supported.
> .PP
> This
> .BR ioctl (2)
> --
--
Peter Xu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ioctl_userfaultfd.2: Corrections for returned .ioctls members
2022-03-21 6:10 ` Peter Xu
@ 2022-03-22 12:32 ` Alejandro Colomar (man-pages)
2022-03-22 16:23 ` Axel Rasmussen
0 siblings, 1 reply; 6+ messages in thread
From: Alejandro Colomar (man-pages) @ 2022-03-22 12:32 UTC (permalink / raw)
To: Peter Xu, Ian Abbott
Cc: linux-man, Michael Kerrisk, linux-kernel, Axel Rasmussen
Hi Ian and Peter,
On 3/21/22 07:10, Peter Xu wrote:
> On Fri, Mar 18, 2022 at 07:13:43PM +0000, Ian Abbott wrote:
>> Support for the `UFFDIO_WRITEPROTECT` operation is not indicated in the
>> `ioctls` member of `struct uffdio_api`. It is indicated in the `ioctls`
>> member of `struct uffdio_register` along with indications of support for
>> the `UFFDIO_COPY`, `UFFDIO_WAKE` and `UFFDIO_ZEROPAGE` operations (and
>> also the `UFFDIO_CONTINUE` operation supported since Linux 5.13 but
>> that is not documented by this man page yet.)
>
> I thought it should have landed but indeed it's not. Copying Axel.
>
>>
>> Fixes: f559fa36a678 ("ioctl_userfaultfd.2: Add write-protect mode docs")
>> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Patch applied.
>
> The patch looks correct to me, thanks for fixing it.
>
> Acked-by: Peter Xu <peterx@redhat.com>
And tag appended.
Thank you both!
Alex
>
>> ---
>> man2/ioctl_userfaultfd.2 | 27 ++++++++++++++++++++-------
>> 1 file changed, 20 insertions(+), 7 deletions(-)
>>
>> diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2
>> index 504f61d4b..e930af520 100644
>> --- a/man2/ioctl_userfaultfd.2
>> +++ b/man2/ioctl_userfaultfd.2
>> @@ -235,11 +235,6 @@ operation is supported.
>> The
>> .B UFFDIO_UNREGISTER
>> operation is supported.
>> -.TP
>> -.B 1 << _UFFDIO_WRITEPROTECT
>> -The
>> -.B UFFDIO_WRITEPROTECT
>> -operation is supported.
>> .PP
>> This
>> .BR ioctl (2)
>> @@ -333,8 +328,26 @@ If the operation is successful, the kernel modifies the
>> bit-mask field to indicate which
>> .BR ioctl (2)
>> operations are available for the specified range.
>> -This returned bit mask is as for
>> -.BR UFFDIO_API .
>> +This returned bit mask can contain the following bits:
>> +.TP
>> +.B 1 << _UFFDIO_COPY
>> +The
>> +.B UFFDIO_COPY
>> +operation is supported.
>> +.TP
>> +.B 1 << _UFFDIO_WAKE
>> +The
>> +.B UFFDIO_WAKE
>> +operation is supported.
>> +.TP
>> +.B 1 << _UFFDIO_WRITEPROTECT
>> +The
>> +.B UFFDIO_WRITEPROTECT
>> +.TP
>> +.B 1 << _UFFDIO_ZEROPAGE
>> +The
>> +.B UFFDIO_ZEROPAGE
>> +operation is supported.
>> .PP
>> This
>> .BR ioctl (2)
>> --
>
--
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ioctl_userfaultfd.2: Corrections for returned .ioctls members
2022-03-22 12:32 ` Alejandro Colomar (man-pages)
@ 2022-03-22 16:23 ` Axel Rasmussen
2022-03-22 16:36 ` Axel Rasmussen
0 siblings, 1 reply; 6+ messages in thread
From: Axel Rasmussen @ 2022-03-22 16:23 UTC (permalink / raw)
To: Alejandro Colomar (man-pages)
Cc: Peter Xu, Ian Abbott, linux-man, Michael Kerrisk, LKML
On Tue, Mar 22, 2022 at 5:32 AM Alejandro Colomar (man-pages)
<alx.manpages@gmail.com> wrote:
>
> Hi Ian and Peter,
>
> On 3/21/22 07:10, Peter Xu wrote:
> > On Fri, Mar 18, 2022 at 07:13:43PM +0000, Ian Abbott wrote:
> >> Support for the `UFFDIO_WRITEPROTECT` operation is not indicated in the
> >> `ioctls` member of `struct uffdio_api`. It is indicated in the `ioctls`
> >> member of `struct uffdio_register` along with indications of support for
> >> the `UFFDIO_COPY`, `UFFDIO_WAKE` and `UFFDIO_ZEROPAGE` operations (and
> >> also the `UFFDIO_CONTINUE` operation supported since Linux 5.13 but
> >> that is not documented by this man page yet.)
> >
> > I thought it should have landed but indeed it's not. Copying Axel.
Ah, I mistakenly thought it got merged, but there were a few remaining
issues Alejandro wanted addressed first. I'll send a v3 of it later
today.
For what it's worth, as part of adding minor fault handling, we pretty
significantly change the ioctl field's behavior, and I rewrote a lot
of the documentation around it. So, it may conflict with this patch.
:/ Sorry about that.
> >
> >>
> >> Fixes: f559fa36a678 ("ioctl_userfaultfd.2: Add write-protect mode docs")
> >> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
>
> Patch applied.
>
> >
> > The patch looks correct to me, thanks for fixing it.
> >
> > Acked-by: Peter Xu <peterx@redhat.com>
>
> And tag appended.
>
> Thank you both!
>
> Alex
>
> >
> >> ---
> >> man2/ioctl_userfaultfd.2 | 27 ++++++++++++++++++++-------
> >> 1 file changed, 20 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2
> >> index 504f61d4b..e930af520 100644
> >> --- a/man2/ioctl_userfaultfd.2
> >> +++ b/man2/ioctl_userfaultfd.2
> >> @@ -235,11 +235,6 @@ operation is supported.
> >> The
> >> .B UFFDIO_UNREGISTER
> >> operation is supported.
> >> -.TP
> >> -.B 1 << _UFFDIO_WRITEPROTECT
> >> -The
> >> -.B UFFDIO_WRITEPROTECT
> >> -operation is supported.
> >> .PP
> >> This
> >> .BR ioctl (2)
> >> @@ -333,8 +328,26 @@ If the operation is successful, the kernel modifies the
> >> bit-mask field to indicate which
> >> .BR ioctl (2)
> >> operations are available for the specified range.
> >> -This returned bit mask is as for
> >> -.BR UFFDIO_API .
> >> +This returned bit mask can contain the following bits:
> >> +.TP
> >> +.B 1 << _UFFDIO_COPY
> >> +The
> >> +.B UFFDIO_COPY
> >> +operation is supported.
> >> +.TP
> >> +.B 1 << _UFFDIO_WAKE
> >> +The
> >> +.B UFFDIO_WAKE
> >> +operation is supported.
> >> +.TP
> >> +.B 1 << _UFFDIO_WRITEPROTECT
> >> +The
> >> +.B UFFDIO_WRITEPROTECT
> >> +.TP
> >> +.B 1 << _UFFDIO_ZEROPAGE
> >> +The
> >> +.B UFFDIO_ZEROPAGE
> >> +operation is supported.
> >> .PP
> >> This
> >> .BR ioctl (2)
> >> --
> >
>
> --
> Alejandro Colomar
> Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
> http://www.alejandro-colomar.es/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ioctl_userfaultfd.2: Corrections for returned .ioctls members
2022-03-22 16:23 ` Axel Rasmussen
@ 2022-03-22 16:36 ` Axel Rasmussen
2022-03-22 16:46 ` Ian Abbott
0 siblings, 1 reply; 6+ messages in thread
From: Axel Rasmussen @ 2022-03-22 16:36 UTC (permalink / raw)
To: Alejandro Colomar (man-pages)
Cc: Peter Xu, Ian Abbott, linux-man, Michael Kerrisk, LKML
On Tue, Mar 22, 2022 at 9:23 AM Axel Rasmussen <axelrasmussen@google.com> wrote:
>
> On Tue, Mar 22, 2022 at 5:32 AM Alejandro Colomar (man-pages)
> <alx.manpages@gmail.com> wrote:
> >
> > Hi Ian and Peter,
> >
> > On 3/21/22 07:10, Peter Xu wrote:
> > > On Fri, Mar 18, 2022 at 07:13:43PM +0000, Ian Abbott wrote:
> > >> Support for the `UFFDIO_WRITEPROTECT` operation is not indicated in the
> > >> `ioctls` member of `struct uffdio_api`. It is indicated in the `ioctls`
> > >> member of `struct uffdio_register` along with indications of support for
> > >> the `UFFDIO_COPY`, `UFFDIO_WAKE` and `UFFDIO_ZEROPAGE` operations (and
> > >> also the `UFFDIO_CONTINUE` operation supported since Linux 5.13 but
> > >> that is not documented by this man page yet.)
> > >
> > > I thought it should have landed but indeed it's not. Copying Axel.
>
> Ah, I mistakenly thought it got merged, but there were a few remaining
> issues Alejandro wanted addressed first. I'll send a v3 of it later
> today.
>
> For what it's worth, as part of adding minor fault handling, we pretty
> significantly change the ioctl field's behavior, and I rewrote a lot
> of the documentation around it. So, it may conflict with this patch.
> :/ Sorry about that.
Heh, I spoke too soon. My patch doesn't touch this after all, I think
the patches don't conflict. :) It's been a while since I looked at
it...
>
> > >
> > >>
> > >> Fixes: f559fa36a678 ("ioctl_userfaultfd.2: Add write-protect mode docs")
> > >> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> >
> > Patch applied.
> >
> > >
> > > The patch looks correct to me, thanks for fixing it.
> > >
> > > Acked-by: Peter Xu <peterx@redhat.com>
> >
> > And tag appended.
> >
> > Thank you both!
> >
> > Alex
> >
> > >
> > >> ---
> > >> man2/ioctl_userfaultfd.2 | 27 ++++++++++++++++++++-------
> > >> 1 file changed, 20 insertions(+), 7 deletions(-)
> > >>
> > >> diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2
> > >> index 504f61d4b..e930af520 100644
> > >> --- a/man2/ioctl_userfaultfd.2
> > >> +++ b/man2/ioctl_userfaultfd.2
> > >> @@ -235,11 +235,6 @@ operation is supported.
> > >> The
> > >> .B UFFDIO_UNREGISTER
> > >> operation is supported.
> > >> -.TP
> > >> -.B 1 << _UFFDIO_WRITEPROTECT
> > >> -The
> > >> -.B UFFDIO_WRITEPROTECT
> > >> -operation is supported.
> > >> .PP
> > >> This
> > >> .BR ioctl (2)
> > >> @@ -333,8 +328,26 @@ If the operation is successful, the kernel modifies the
> > >> bit-mask field to indicate which
> > >> .BR ioctl (2)
> > >> operations are available for the specified range.
> > >> -This returned bit mask is as for
> > >> -.BR UFFDIO_API .
> > >> +This returned bit mask can contain the following bits:
> > >> +.TP
> > >> +.B 1 << _UFFDIO_COPY
> > >> +The
> > >> +.B UFFDIO_COPY
> > >> +operation is supported.
> > >> +.TP
> > >> +.B 1 << _UFFDIO_WAKE
> > >> +The
> > >> +.B UFFDIO_WAKE
> > >> +operation is supported.
> > >> +.TP
> > >> +.B 1 << _UFFDIO_WRITEPROTECT
> > >> +The
> > >> +.B UFFDIO_WRITEPROTECT
> > >> +.TP
> > >> +.B 1 << _UFFDIO_ZEROPAGE
> > >> +The
> > >> +.B UFFDIO_ZEROPAGE
> > >> +operation is supported.
> > >> .PP
> > >> This
> > >> .BR ioctl (2)
> > >> --
> > >
> >
> > --
> > Alejandro Colomar
> > Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
> > http://www.alejandro-colomar.es/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ioctl_userfaultfd.2: Corrections for returned .ioctls members
2022-03-22 16:36 ` Axel Rasmussen
@ 2022-03-22 16:46 ` Ian Abbott
0 siblings, 0 replies; 6+ messages in thread
From: Ian Abbott @ 2022-03-22 16:46 UTC (permalink / raw)
To: Axel Rasmussen, Alejandro Colomar (man-pages)
Cc: Peter Xu, linux-man, Michael Kerrisk, LKML
On 22/03/2022 16:36, Axel Rasmussen wrote:
> On Tue, Mar 22, 2022 at 9:23 AM Axel Rasmussen <axelrasmussen@google.com> wrote:
>>
>> On Tue, Mar 22, 2022 at 5:32 AM Alejandro Colomar (man-pages)
>> <alx.manpages@gmail.com> wrote:
>>>
>>> Hi Ian and Peter,
>>>
>>> On 3/21/22 07:10, Peter Xu wrote:
>>>> On Fri, Mar 18, 2022 at 07:13:43PM +0000, Ian Abbott wrote:
>>>>> Support for the `UFFDIO_WRITEPROTECT` operation is not indicated in the
>>>>> `ioctls` member of `struct uffdio_api`. It is indicated in the `ioctls`
>>>>> member of `struct uffdio_register` along with indications of support for
>>>>> the `UFFDIO_COPY`, `UFFDIO_WAKE` and `UFFDIO_ZEROPAGE` operations (and
>>>>> also the `UFFDIO_CONTINUE` operation supported since Linux 5.13 but
>>>>> that is not documented by this man page yet.)
>>>>
>>>> I thought it should have landed but indeed it's not. Copying Axel.
>>
>> Ah, I mistakenly thought it got merged, but there were a few remaining
>> issues Alejandro wanted addressed first. I'll send a v3 of it later
>> today.
>>
>> For what it's worth, as part of adding minor fault handling, we pretty
>> significantly change the ioctl field's behavior, and I rewrote a lot
>> of the documentation around it. So, it may conflict with this patch.
>> :/ Sorry about that.
>
> Heh, I spoke too soon. My patch doesn't touch this after all, I think
> the patches don't conflict. :) It's been a while since I looked at
> it...
I guess the section (in my patch) that indicates supported ioctls in
`struct uffdio_register` would still need tweaking to mention
`UFFDIO_CONTINUE` though, so either one of the patches will need to
change or another little patch will be needed.
--
-=( Ian Abbott <abbotti@mev.co.uk> || MEV Ltd. is a company )=-
-=( registered in England & Wales. Regd. number: 02862268. )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-03-22 16:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 19:13 [PATCH] ioctl_userfaultfd.2: Corrections for returned .ioctls members Ian Abbott
2022-03-21 6:10 ` Peter Xu
2022-03-22 12:32 ` Alejandro Colomar (man-pages)
2022-03-22 16:23 ` Axel Rasmussen
2022-03-22 16:36 ` Axel Rasmussen
2022-03-22 16:46 ` Ian Abbott
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.