From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C294C43334 for ; Mon, 6 Jun 2022 19:40:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7D4826B0073; Mon, 6 Jun 2022 15:40:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 784986B0074; Mon, 6 Jun 2022 15:40:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 64C866B0078; Mon, 6 Jun 2022 15:40:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 5392C6B0073 for ; Mon, 6 Jun 2022 15:40:28 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 30C221209F3 for ; Mon, 6 Jun 2022 19:40:28 +0000 (UTC) X-FDA: 79548827736.12.B21E34D Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf02.hostedemail.com (Postfix) with ESMTP id B19C08002B for ; Mon, 6 Jun 2022 19:40:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654544427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BHWgePvsgocymAfwWHluoqF9NXAEWWcWv6LxbnaOXDA=; b=X33RVR4IAeyDAGDPq//bpXrRnLDGYLN3mH4+qEUdPq8U5LL3OS9td45IBEF1P/vTNvLv+z /a8MOE34PqSJFjpSkPBQS5BHQzdfu/LZHAchj2v6Qqxrg9Faz6/x4IIsMRAMbqbAJSZiRB mzjm60sV2fDCwnTfDSnKXb/1UEDxy5k= Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-593-Gj_Z2T8sOImQK5Aafym_qw-1; Mon, 06 Jun 2022 15:40:11 -0400 X-MC-Unique: Gj_Z2T8sOImQK5Aafym_qw-1 Received: by mail-io1-f71.google.com with SMTP id g12-20020a5e8b0c000000b006694b912e2bso1999304iok.6 for ; Mon, 06 Jun 2022 12:40:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BHWgePvsgocymAfwWHluoqF9NXAEWWcWv6LxbnaOXDA=; b=2LLe5mgHBDGVmuP8BTjo32I6I16MGxDfxvDvHrBfTBlUpfZv50/zaVXMMcnbpBi6H8 8GMKx4/kGocMahyGunnS7AnZLqeyyza9q+1B3RgbxJVYdwmjyraQ9TqdX2cmFByKwY3y WkuJ1d+2ueGKMs0UaHkkvwxA67PpSHrjHVFDEgTVn9WkLk2HXx8g5986sfmZAtOHR4qA ujMrEoyk8I346E1HkfO8np9bNN70s6RHa7r5giano1CkR7G/m0quzqG+2NVOfq6GH9eH /6wt8fp/Xk3aKUDx7GaXrYRnqyduDfqJPoadIQFP24sC1fvhYMWImaJim+o2okt4mT+F jEwA== X-Gm-Message-State: AOAM532yhNSRFSllBOLJ3oZItuR0uhksh4ikFvgzxhYQa0np++jRz2Rc pmMVoJDjMvyq5w2jaj28AfBvyeO0SJBl4LEF53DnuNf32wgMQZLRcNpNlf/XJMrcIP+O7Svm97R /Z/v3noovCU0= X-Received: by 2002:a5d:9342:0:b0:654:9336:81d7 with SMTP id i2-20020a5d9342000000b00654933681d7mr12060095ioo.136.1654544410964; Mon, 06 Jun 2022 12:40:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuTKxZdnLSXq6Q+yjA59OHzqCNYnL821EC8c6pW3mzs2G+oMyIYxeKfNMpC3h6b3zlhRSLcw== X-Received: by 2002:a5d:9342:0:b0:654:9336:81d7 with SMTP id i2-20020a5d9342000000b00654933681d7mr12060081ioo.136.1654544410731; Mon, 06 Jun 2022 12:40:10 -0700 (PDT) Received: from xz-m1.local (cpec09435e3e0ee-cmc09435e3e0ec.cpe.net.cable.rogers.com. [99.241.198.116]) by smtp.gmail.com with ESMTPSA id n29-20020a02711d000000b00331a94f2b04sm1676363jac.105.2022.06.06.12.40.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 12:40:09 -0700 (PDT) Date: Mon, 6 Jun 2022 15:40:08 -0400 From: Peter Xu To: Alejandro Colomar Cc: linux-kernel@vger.kernel.org, linux-man@vger.kernel.org, linux-mm@kvack.org, Andrea Arcangeli , Nadav Amit , Axel Rasmussen , Andrew Morton Subject: Re: [PATCH v2 0/2] userfaultfd.2: Update to latest Message-ID: References: <20220603173736.62581-1-peterx@redhat.com> <7acfdeb8-5dd3-dfe2-5717-b64006281a8f@gmail.com> MIME-Version: 1.0 In-Reply-To: <7acfdeb8-5dd3-dfe2-5717-b64006281a8f@gmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: B19C08002B X-Stat-Signature: yhhzgisi5s4ajxupzf5hs5og1gfh5y6k X-Rspam-User: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=X33RVR4I; spf=none (imf02.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1654544420-241154 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jun 06, 2022 at 08:52:25PM +0200, Alejandro Colomar wrote: > Hi Peter, Hi, Alex, > > On 6/3/22 19:37, Peter Xu wrote: > > v2: > > - Use semantic newlines always in patch 1 [Alex] > > - Fix s/.BR/.B/ in patch 2 [Alex] > > - Rebased to http://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git > > > > Add the two missing pieces till latest 5.19-rc1: the UFFD_USER_MODE_ONLY > > flag, and also the recent wr-protect support on shmem and hugetlbfs. > > > > Please review, thanks. > > > > Peter Xu (2): > > userfaultfd.2: Add section for UFFD_USER_MODE_ONLY > > userfaultfd.2: Update on write-protection support > > > > man2/userfaultfd.2 | 23 ++++++++++++++++++----- > > 1 file changed, 18 insertions(+), 5 deletions(-) > > > > > I think the patch below would improve a little bit the wording (and > newlines). I still have a bit of trouble understanding "When a > kernel-originated fault was triggered on the registered range with this > userfaultfd". Did you maybe mean "range registered" instead of "registered > range"? Since I'm not a native speaker I don't immediately see the difference between the two.. What I wanted to express is all the memory ranges that we registered with UFFDIO_REGISTER ioctl, and further it was trying to describe what the kernel will do when there're any page faults that were triggered upon those ranges from a kernel context. It's always challenging for me to grasp how you prefer the newlines are made, but anyway below changes looks good to me. Thanks, > > Thanks, > > Alex > > > diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 > index 9b5ec0358..0c0a4f687 100644 > --- a/man2/userfaultfd.2 > +++ b/man2/userfaultfd.2 > @@ -62,11 +62,11 @@ flag in > .BR open (2). > .TP > .B UFFD_USER_MODE_ONLY > -This is an userfaultfd specific flag that was introduced since Linux 5.11. > -When set, the userfaultfd object will only be able to handle page faults > -originated from the userspace on the registered regions. > -When a kernel originated fault was triggered on the registered range with > -this userfaultfd, a > +This is an userfaultfd-specific flag that was introduced in Linux 5.11. > +When set, the userfaultfd object will only be able to handle > +page faults originated from the user space on the registered regions. > +When a kernel-originated fault was triggered > +on the registered range with this userfaultfd, a > .B SIGBUS > signal will be delivered. > .PP > @@ -277,8 +277,9 @@ 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. > +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 > .BR UFFD_FEATURE_WP_HUGETLBFS_SHMEM . > .PP > > > -- > Alejandro Colomar > -- Peter Xu