From: Alejandro Colomar <alx.manpages@gmail.com>
To: Peter Xu <peterx@redhat.com>,
linux-kernel@vger.kernel.org, linux-man@vger.kernel.org,
linux-mm@kvack.org
Cc: Axel Rasmussen <axelrasmussen@google.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Nadav Amit <nadav.amit@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/2] userfaultfd.2: Update on write-protection support
Date: Fri, 3 Jun 2022 19:12:53 +0200 [thread overview]
Message-ID: <22004457-a6a8-1e9e-4220-ae15339ec94b@gmail.com> (raw)
In-Reply-To: <20220531011157.46868-3-peterx@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 2269 bytes --]
Hi Peter,
On 5/31/22 03:11, Peter Xu wrote:
> The shmem/hugetlbfs memory types are supported for write-protection
> messages very lately. Update the man page to reflect that.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Please see some source formatting comments below.
Cheers,
Alex
> ---
> man2/userfaultfd.2 | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2
> index 0928a76d2..99aae8b50 100644
> --- a/man2/userfaultfd.2
> +++ b/man2/userfaultfd.2
> @@ -273,13 +273,17 @@ Since Linux 4.11,
> userfaultfd can be also used with hugetlbfs and shared memory mappings.
> .\"
> .SS Userfaultfd write-protect mode (since 5.7)
> -Since Linux 5.7, userfaultfd supports write-protect mode.
> +Since Linux 5.7, userfaultfd supports write-protect mode for anonymous memory.
> The user needs to first check availability of this feature using
> .B UFFDIO_API
> ioctl against the feature bit
> .B UFFD_FEATURE_PAGEFAULT_FLAG_WP
> before using this feature.
> .PP
> +Since Linux 5.19, the write-protection mode was also supported on shmem and hugetlbfs
> +memory types. It can be detected with the feature bit
See man-pages(7):
[
Use semantic newlines
In the source of a manual page, new sentences should be
started on new lines, and long sentences should be split
into lines at clause breaks (commas, semicolons, colons,
and so on). This convention, sometimes known as "seman‐
tic newlines", makes it easier to see the effect of
patches, which often operate at the level of individual
sentences or sentence clauses.
]
> +.BR UFFD_FEATURE_WP_HUGETLBFS_SHMEM .
> +.PP
> To register with userfaultfd write-protect mode, the user needs to initiate the
> .B UFFDIO_REGISTER
> ioctl with mode
> @@ -330,8 +334,6 @@ ioctl, whose
> should have the flag
> .B UFFDIO_WRITEPROTECT_MODE_WP
> cleared upon the faulted page or range.
> -.PP
> -Write-protect mode supports only private anonymous memory.
> .SS Reading from the userfaultfd structure
> Each
> .BR read (2)
--
Alejandro Colomar
<http://www.alejandro-colomar.es/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2022-06-03 17:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-31 1:11 [PATCH 0/2] userfaultfd.2: Update to latest Peter Xu
2022-05-31 1:11 ` [PATCH 1/2] userfaultfd.2: Add section for UFFD_USER_MODE_ONLY Peter Xu
2022-06-03 17:11 ` Alejandro Colomar
2022-06-03 17:34 ` Peter Xu
2022-05-31 1:11 ` [PATCH 2/2] userfaultfd.2: Update on write-protection support Peter Xu
2022-06-03 17:12 ` Alejandro Colomar [this message]
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=22004457-a6a8-1e9e-4220-ae15339ec94b@gmail.com \
--to=alx.manpages@gmail.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nadav.amit@gmail.com \
--cc=peterx@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).