All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: Axel Rasmussen <axelrasmussen@google.com>
Cc: Mike Rapoport <rppt@kernel.org>, Peter Xu <peterx@redhat.com>,
	linux-man@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] ioctl_userfaultfd.2: fix / update UFFDIO_REGISTER error code list
Date: Wed, 18 Oct 2023 01:23:46 +0200	[thread overview]
Message-ID: <ZS8XglFnkdMdILaw@debian> (raw)
In-Reply-To: <20231017230110.3170850-3-axelrasmussen@google.com>

[-- Attachment #1: Type: text/plain, Size: 3057 bytes --]

Hi Axel, Mike,

On Tue, Oct 17, 2023 at 04:01:09PM -0700, Axel Rasmussen wrote:
> The list of error codes in the man page was out of date with respect to
> the current state of the kernel. Some errors were partially /
> incorrectly described.
> 
> Update the error code listing, so it matches the current state of the
> kernel, and correctly describes all the errors.
> 
> Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>

I'll wait a bit before applying this one, in case Mike (or Peter) want
to review it.

The other two, you can find them here, as usual:
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=9ae03d21383151794b118ac8dd98b4d6e26c9689>
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=5f1acc81e55540d1276977e66d64649c6ca7b58b>

And BTW, while running `make lint build check`, I caught some accidents
from a previous patch from yours:
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=bf8647d1d82205934776b474fe89e5f30e03ad25>

Cheers,
Alex

> ---
>  man2/ioctl_userfaultfd.2 | 33 +++++++++++++++++++--------------
>  1 file changed, 19 insertions(+), 14 deletions(-)
> 
> diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2
> index 82aee667c..40528001e 100644
> --- a/man2/ioctl_userfaultfd.2
> +++ b/man2/ioctl_userfaultfd.2
> @@ -413,8 +413,6 @@ On error, \-1 is returned and
>  .I errno
>  is set to indicate 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
> @@ -433,21 +431,28 @@ field; or the
>  field was zero.
>  .TP
>  .B EINVAL
> -There is no mapping in the specified address range.
> -.TP
> -.B EINVAL
> -.I range.start
> +The specified address range was invalid.
> +More specifically,
> +no mapping exists in the given range,
> +or the mapping that exists there is invalid
> +(e.g. unsupported type of memory),
> +or the range values
> +.RI ( range.start
> +or
> +.IR range.len )
> +are not multiples of the relevant page size,
>  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.
> +is zero.
>  .TP
> -.B EINVAL
> -There as an incompatible mapping in the specified address range.
> -.\" Mike Rapoport:
> -.\" ENOMEM if the process is exiting and the
> -.\" mm_struct has gone by the time userfault grabs it.
> +.B ENOMEM
> +The process is exiting,
> +and its address space has already been torn down
> +when userfaultfd attempts to reference it.
> +.TP
> +.B EPERM
> +The userfaultfd would allow writing to a file backing the mapping,
> +but the calling process lacks such write permissions.
>  .SS UFFDIO_UNREGISTER
>  (Since Linux 4.3.)
>  Unregister a memory address range from userfaultfd.
> -- 
> 2.42.0.655.g421f12c284-goog
> 

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-10-17 23:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 23:01 [PATCH v3 0/3] userfaultfd man page updates Axel Rasmussen
2023-10-17 23:01 ` [PATCH v3 1/3] ioctl_userfaultfd.2: clarify the state of the uffdio_api structure on error Axel Rasmussen
2023-10-17 23:07   ` Alejandro Colomar
2023-10-17 23:01 ` [PATCH v3 2/3] ioctl_userfaultfd.2: fix / update UFFDIO_REGISTER error code list Axel Rasmussen
2023-10-17 23:23   ` Alejandro Colomar [this message]
2023-10-17 23:01 ` [PATCH v3 3/3] ioctl_userfaultfd.2: document new UFFDIO_POISON ioctl Axel Rasmussen
2023-10-17 23:20   ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZS8XglFnkdMdILaw@debian \
    --to=alx@kernel.org \
    --cc=axelrasmussen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.com \
    --cc=rppt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.