Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1759760rdb; Mon, 9 Oct 2023 01:46:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfZDFRtAdPR1ZYYKAXYfg3y1bUR/SxkgUjOmhlLEy748P8KujKPktZDmknurx2frdxpr/I X-Received: by 2002:a05:6830:6b91:b0:6bd:be5:daa2 with SMTP id dd17-20020a0568306b9100b006bd0be5daa2mr15793841otb.33.1696841190907; Mon, 09 Oct 2023 01:46:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696841190; cv=none; d=google.com; s=arc-20160816; b=AqTUqnaDC0BYvJIazKsDC81HAX0pbkhcz/MvWVHY4o6I1ShV9DOcVABYMVz4Bylz6r a/mVM1aJp1nBGYOTM3hMpoqvkfKuBbx6zJRQUV41/FxEy4VM2nybhuBB2fOwldRcPrVN MI8j1vrsMsCYHE0j0X79UFwUl4TgkiyjutZRP8N40T+R/PUU6ATrCJIbHn9DoMawc8q1 +bmAAl33Pou2NolSsZAnvbhS7VZlv6ZyeaskNpou2s7vBmO43I1BYdFaCaV+uCUFk5t8 225bYvzoeL12Fmk2Vq8qt9CAhS1ILZLc5KUdcI7kM9V74XPMPKfVHR2vRuWmhSjrHZdx jFQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kXfaBK5peuda3ld2EGc+YRwDY6sTqHJz/+w8jFXTAYc=; fh=F5M/07vUqNxvrCSEZSXffLFlrqXZOtORyIukROoamOM=; b=blAPr5bKMEJ5aVf04Y0t7mx9g2X3+B792P8ePBwCJATb+1am2G/8xWAtQkziYQIPeS KstvZ/WQcjvDjkKYXJYOGsmGwTals60MYCQ62IcrMq2F1mFOP+24jW/D7W17Mvv/lbv5 /eVQevUI7s4LFotPyAVTcizhISnYsrC+dyo5wJW+9GE/oeY+VBUZDsCvEW0UidQGP0il qiSV1i00jTG4+2ClWSCKTaP6yVQ0pUT7peURLIq9DvWwQgUpvm0EIXxOWCM+gahCbaiV 8zXxFb4S7YkYPskRtSH6wAHQz/s9h8qU+qOqUbCGNx3Zar0SMYs2Fkadj2wAWjWTFBH5 qbOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I3dYy1Ko; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id x5-20020a654145000000b0059779ae589dsi1064406pgp.828.2023.10.09.01.46.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 01:46:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I3dYy1Ko; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 62AA38044FC5; Mon, 9 Oct 2023 01:46:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345431AbjJIIqK (ORCPT + 99 others); Mon, 9 Oct 2023 04:46:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234486AbjJIIqJ (ORCPT ); Mon, 9 Oct 2023 04:46:09 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F6BCC6; Mon, 9 Oct 2023 01:46:08 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE388C433C8; Mon, 9 Oct 2023 08:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696841167; bh=4JrSlnFr9jjlqFcYvnhKELkzAZe3psc0YA2wC2PKOoc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I3dYy1KomBSg0N9OvWTjDui2Y1tQMe7OST9cx1fomAEBxV+T20YbIhUfr00Ltj/Fv z6O6wbeW7l/Kz/OOjV767mm4YCH+CWEIvnYxhaMP8d6gYPNkvR+ljrdHTeuNYpJA+W bS590m9NLNyocu3hYh+nm45GHLd2maO6Y2J4rWrvG3dIJDZ1bgssCVeCx6Mt4M2kER uMINcw/qr1FRSysxG0LSAt9s2J3DMMJbmqpTQmzuUVL1p3+sBFkfTnevlYdH1ENUzg gyf+JnKauI/45Q6IXB3bEvHYs7oKuB9wwqXXnha836ZxFxbemRHLTf/rBLIiH0Qa5R h8jN+Dkhfhh+g== Date: Mon, 9 Oct 2023 11:45:14 +0300 From: Mike Rapoport To: Axel Rasmussen Cc: Alejandro Colomar , Peter Xu , linux-man@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/10] ioctl_userfaultfd.2: describe missing UFFDIO_API feature flags Message-ID: <20231009084514.GJ3303@kernel.org> References: <20230919190206.388896-1-axelrasmussen@google.com> <20230919190206.388896-7-axelrasmussen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230919190206.388896-7-axelrasmussen@google.com> X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 09 Oct 2023 01:46:26 -0700 (PDT) X-Spam-Level: ** On Tue, Sep 19, 2023 at 12:02:02PM -0700, Axel Rasmussen wrote: > Several new features have been added to the kernel recently, and the man > page wasn't updated to describe these new features. So, add in > descriptions of any missing features. > > Signed-off-by: Axel Rasmussen Reviewed-by: Mike Rapoport (IBM) with a small nit below > --- > man2/ioctl_userfaultfd.2 | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 > index e91a1dfc8..53b1f473f 100644 > --- a/man2/ioctl_userfaultfd.2 > +++ b/man2/ioctl_userfaultfd.2 > @@ -204,6 +204,13 @@ If this feature bit is set, > .I uffd_msg.pagefault.feat.ptid > will be set to the faulted thread ID for each page-fault message. > .TP > +.BR UFFD_FEATURE_PAGEFAULT_FLAG_WP " (since Linux 5.10)" > +If this feature bit is set, > +userfaultfd supports write-protect faults > +for anonymous memory. > +(Note that shmem / hugetlbfs support > +is indicated by a separate feature.) > +.TP > .BR UFFD_FEATURE_MINOR_HUGETLBFS " (since Linux 5.13)" > If this feature bit is set, > the kernel supports registering userfaultfd ranges > @@ -221,6 +228,22 @@ will be set to the exact page-fault address that was reported by the hardware, > and will not mask the offset within the page. > Note that old Linux versions might indicate the exact address as well, > even though the feature bit is not set. > +.TP > +.BR UFFD_FEATURE_WP_HUGETLBFS_SHMEM " (since Linux 5.19)" > +If this feature bit is set, > +userfaultfd supports write-protect faults > +for hugetlbfs and shmem / tmpfs memory. > +.TP > +.BR UFFD_FEATURE_WP_UNPOPULATED " (since Linux 6.4)" > +If this feature bit is set, > +the kernel will handle anonymous memory the same way as file memory, > +by allowing the user to write-protect unpopulated ptes. Nit: s/ptes/page table entries/ > +.TP > +.BR UFFD_FEATURE_POISON " (since Linux 6.6)" > +If this feature bit is set, > +the kernel supports resolving faults with the > +.B UFFDIO_POISON > +ioctl. > .PP > The returned > .I ioctls > -- > 2.42.0.459.ge4e396fd5e-goog > > -- Sincerely yours, Mike.