From 242c2b6b4385a4b87553104580b933e2fe5fcfb6 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 5 Jan 2017 21:18:08 +1300 Subject: [PATCH] ioctl_userfaultfd.2: Add a few more EINVAL error cases/details Signed-off-by: Michael Kerrisk --- man2/ioctl_userfaultfd.2 | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 index 926b4d376..4870f566a 100644 --- a/man2/ioctl_userfaultfd.2 +++ b/man2/ioctl_userfaultfd.2 @@ -240,6 +240,14 @@ field was zero. There is no mapping in the specified address range. .TP .B EINVAL +.I range.start +or +.I range.len +is not a multiple of the system page size; or, +.I range.len +is zero; or these fields are otherwise invalid. +.TP +.B EINVAL There as an incompatible mapping in the specified address range. .\" FIXME What does "incompatible" mean? .\" @@ -266,7 +274,9 @@ or the .I len field of the .I ufdio_range -structure was not a multiple of the system page size. +structure was not a multiple of the system page size; or the +.I len +field was zero; or these fields were otherwise invalid. .TP .B EINVAL There as an incompatible mapping in the specified address range. @@ -436,8 +446,9 @@ Either .I range.start or .I range.len -was not a multiple of the system page size, -or the range specified was invalid. +was not a multiple of the system page size; or +.I range.len +was zero; or the range specified was invalid. .TP .B EINVAL An invalid bit was specified in the @@ -464,13 +475,15 @@ is set to indicate the cause of the error. Possible errors include: .TP .B EINVAL -Either the +The .I start or the .I len field of the .I ufdio_range -structure was not a multiple of the system page size. +structure was not a multiple of the system page size; or +.I len +was zero; or the specified range was otherwise invalid. .SH RETURN VALUE See descriptions of the individual operations, above. .SH ERRORS