From 264a0a30cecf239494cdb1b323b2cc3cc6ac15fa Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 4 Jan 2017 21:31:57 +1300 Subject: [PATCH] ioctl_userfaultfd.2: Improve UFFDIO_REGISTER description Signed-off-by: Michael Kerrisk --- man2/ioctl_userfaultfd.2 | 42 ++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 index caf0171c0..3ea6c0a29 100644 --- a/man2/ioctl_userfaultfd.2 +++ b/man2/ioctl_userfaultfd.2 @@ -204,18 +204,44 @@ Track page faults on missing pages. .B UFFDIO_REGISTER_MODE_WP Track page faults on write-protected pages. .PP -.\" FIXME Actually, the following sentence appears not to be true; -.\" UFFDIO_REGISTER_MODE_WP seems also to be supported. -.\" Can someone confirm? Currently, the only supported mode is .BR UFFDIO_REGISTER_MODE_MISSING . .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 -range in the +If the operation is successful, the kernel modifies the .I ioctls -field. +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 +.BR ioctl (2) +operation returns 0 on success. +On error, \-1 is returned and +.I errno +is set to indicate the cause of the error. +Possible errors include: +.\" FIXME Is the following error list correct? +.\" +.TP +.B EBUSY +A mapping in the specified range is registered with another +userfaultfd object. +.TP +.B EINVAL +An invalid or unsupported bit was specified in the +.I mode +field; or the +.I mode +field was zero. +.TP +.B EINVAL +There is no mapping in the specified address range. +.TP +.B EINVAL +There as an incompatible mapping in the specified address range. +.\" FIXME What does "incompatible" mean? .\" .SS UFFDIO_UNREGISTER (Since Linux 4.3.)