ioctl_userfaultfd.2: Rework list of ioctl() operations as subsections

Mainly, this means that we drop one level of indentation, which is
useful, since the error lists also add a level of indentation,
and the text overall becomes a little overindented.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-12-30 14:10:16 +01:00
parent fe905357af
commit 637512edfa
1 changed files with 14 additions and 33 deletions

View File

@ -72,9 +72,8 @@ operations.
These operations enable the calling application to resolve page fault
events in a consistent way.
.\" FIXME What does "consistent" mean?
.TP
.BR UFFDIO_API
.\"
.SS UFFDIO_API
Enable operation of the userfaultfd and perform API handshake.
The
.I argp
@ -113,15 +112,13 @@ On error, \-1 is returned and
.I errno
is set to indicate the cause of the error.
Possible errors include:
.RS
.TP
.B EINVAL
The
.B UFFDIO_API
operation has already been performed on this userfaultfd file descriptor.
.RE
.TP
.B UFFDIO_REGISTER
.\"
.SS UFFDIO_REGISTER
Register a memory address range with the userfaultfd object.
The
.I argp
@ -158,8 +155,6 @@ The
field defines the mode of operation desired for this memory region.
The following values may be bitwise ORed to set the userfaultfd mode for
the specified range:
.RS
.TP
.B UFFDIO_REGISTER_MODE_MISSING
Track page faults on missing pages
@ -168,8 +163,7 @@ Track page faults on missing pages
Track page faults on write-protected pages.
Currently, the only supported mode is
.BR UFFDIO_REGISTER_MODE_MISSING .
.RE
.IP
.PP
.\" FIXME In the following, what does "answers" mean, and what are the bits?
.\" (we need a list of the bits here).
The kernel answers which ioctl commands are available for the requested
@ -177,8 +171,7 @@ range in the
.I ioctls
field.
.\"
.TP
.B UFFDIO_UNREGISTER
.SS UFFDIO_UNREGISTER
Unregister a memory address range from userfaultfd.
The address range to unregister is specified in the
.IR uffdio_range
@ -192,7 +185,6 @@ On error, \-1 is returned and
.I errno
is set to indicate the cause of the error.
Possible errors include:
.RS
.TP
.B EINVAL
Either the
@ -208,9 +200,8 @@ There as an incompatible mapping in the specified address range.
.TP
.B EINVAL
There was no mapping in the specified address range.
.RE
.TP
.B UFFDIO_COPY
.\"
.SS UFFDIO_COPY
Atomically copy a continuous memory chunk into the userfault registered
range and optionally wake up the blocked thread.
The source and destination addresses and the number of bytes to copy are
@ -232,19 +223,16 @@ struct uffdio_copy {
};
.fi
.in
.IP
.PP
The following values may be bitwise ORed in
.IR mode
to change the behavior of the
.B UFFDIO_COPY
operation:
.RS
.TP
.B UFFDIO_COPY_MODE_DONTWAKE
Do not wake up the thread that waits for page fault resolution
.RE
.IP
.PP
The
.I copy
field of the
@ -275,8 +263,7 @@ it is not read by the
.B UFFDIO_COPY
operation.
.\"
.TP
.B UFFDIO_ZERO
.SS UFFDIO_ZERO
Zero out a part of memory range registered with userfaultfd.
The requested range is specified by the
.I range
@ -294,19 +281,16 @@ struct uffdio_zeropage {
};
.fi
.in
.IP
.PP
The following values may be bitwise ORed in
.IR mode
to change the behavior of
.B UFFDIO_ZERO
operation:
.RS
.TP
.B UFFDIO_ZEROPAGE_MODE_DONTWAKE
Do not wake up the thread that waits for page-fault resolution.
.RE
.IP
.PP
The
.I zeropage
field of the
@ -316,8 +300,7 @@ that was actually zeroed,
or an error in the same manner as
.IR uffdio_copy.copy .
.\"
.TP
.B UFFDIO_WAKE
.SS UFFDIO_WAKE
Wake up the thread waiting for page-fault resolution.
The
.I argp
@ -334,7 +317,6 @@ On error, \-1 is returned and
.I errno
is set to indicate the cause of the error.
Possible errors include:
.RS
.TP
.B EINVAL
Either the
@ -344,7 +326,6 @@ or the
field of the
.I ufdio_range
structure was not a multiple of the system page size.
.RE
.SH RETURN VALUE
See descriptions of the individual operations, above.
.SH ERRORS