Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1547233rdh; Mon, 25 Sep 2023 16:56:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFEGFCk1ImNAALEnKjf9/fVfBPqfqR8DE0DvvegxbN2mC28kGUesKpADwMXpTBiIRR8zCB3 X-Received: by 2002:a25:cfcf:0:b0:d84:bf91:2cb1 with SMTP id f198-20020a25cfcf000000b00d84bf912cb1mr7590219ybg.31.1695686197852; Mon, 25 Sep 2023 16:56:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695686197; cv=none; d=google.com; s=arc-20160816; b=bCTTYA4Ped9v4DgSGu9fz3Iq43lqqvUVo+/9C1OYj/KT2MYSOokehNRQVAVNouOwxD bX4Ry9GdNNKJSpTyxFu1gj+4x2v+7t1i5/lQglpOtpltgJ4az73hyd8uDXxWLytDDkxo UJO6/PGwhrpTKILA5MJ9NrmZXTuGChEG8UbQ1G8O9Uqsz6jq76pq8389dS4mOQZWTEsQ 0Ddr2qRg7/WqFCjmcr1uChdp7RacBgAxwaLLIHkaZUTaGdt10DMzEHLVIcdCrJWojtuU NcCpFnWR11J8gm4c/FTr7BS+OE18O9Eww2+35xixAOlIOYlcnz+A8ydJW50D3xrR5YP1 qycQ== 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=WWOQmT71dd0hlXTZHpgguE0rZAw0zj9C6mPrwXjQ8Zs=; fh=wtPNz5QEtytCPPuNNoj9k3ZLKUvhc5S3xSbNrMwZr3o=; b=u2QB+X4ohF3GM3mWEgetdNRGbE9NTDrOrMlHJ7CUKyvhXCr0PVv1aohu9x4+/wkIDd zl4P2Z2wGQ3CCqZ4hby2FnJDsnpBjRnnrohl1CYALFOIDCN3YnMmkAouCaHJGkpvtBre dQ1vkoTR98SRqSJYqqv5zIQuLs/CAv6fcidrgyv6Vuwp6jMlMnsoy0r/YsB/bLp7HMIi F7mNwW94bs+YvU9vfVDKWivmZBGfN7XN6zSMfLJZsKI3pMVROVtG+u8tgxSP6u1shAry yVYZF49QDZQUKdvCcQeMmQ7McooSxqu4ZHg4ukPxB7AkLjjAdLmkrVorgOWTAqAi+PdX WdeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="M9Bo/yI7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id n1-20020a63f801000000b00577549e67b9si11564085pgh.589.2023.09.25.16.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 16:56:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="M9Bo/yI7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 0A9B580B8DC3; Mon, 25 Sep 2023 16:50:28 -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 S233584AbjIYXu2 (ORCPT + 99 others); Mon, 25 Sep 2023 19:50:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233600AbjIYXuY (ORCPT ); Mon, 25 Sep 2023 19:50:24 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8ABBCD4; Mon, 25 Sep 2023 16:50:10 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 052A6C433C7; Mon, 25 Sep 2023 23:50:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695685810; bh=ssvRcYJRbvcBMwmXbSD5F1sToCHWJRiM/v4IspFc1LE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M9Bo/yI7d/Y+3iaOC0FmpbSUs5mfLVWWByKDGW8mSSurOYXek9ZHvcxuWd03BA80t Z/yXBGU7tkILaRTXrMGZZXuTHeeTnimx0Bjbg4MIyFMYlmIS39WbJBs/rzri/D54YT e/uFqiGYm0TTnBhixhuOvme8Df+PEAEefJf+LSOul+Qo2XC6vknrgMNM5lqmJG108J hs4NFSV0LOXlK4LUyOfbXWZEFfDwrfqXPCsXe/q7hhnivoYBKYEuKVq2Ikn9sgkYXE KgRvox2P4IDkItuvf2Ecc6FSxnoI+l0UjyubrS1ntxluEt0IrUQbelzLZA+ke5ac5B tjCh2V1+WDkzQ== Date: Tue, 26 Sep 2023 01:50:06 +0200 From: Alejandro Colomar To: Axel Rasmussen Cc: 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: <4a6utza2kwlghdrgpoc2p56gfzwb4lwpp6rsqed4gaecvbfdxt@f2gw6c737te6> References: <20230919190206.388896-1-axelrasmussen@google.com> <20230919190206.388896-7-axelrasmussen@google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cjrue5kcslvl7m5p" Content-Disposition: inline In-Reply-To: <20230919190206.388896-7-axelrasmussen@google.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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, 25 Sep 2023 16:50:28 -0700 (PDT) --cjrue5kcslvl7m5p Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 06/10] ioctl_userfaultfd.2: describe missing UFFDIO_API feature flags MIME-Version: 1.0 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. >=20 > Signed-off-by: Axel Rasmussen > --- Patch applied. Thanks, Alex > man2/ioctl_userfaultfd.2 | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) >=20 > 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. > +.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 > --=20 > 2.42.0.459.ge4e396fd5e-goog >=20 --cjrue5kcslvl7m5p Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE6jqH8KTroDDkXfJAnowa+77/2zIFAmUSHK4ACgkQnowa+77/ 2zKijg//Y70CRLE5sfeTvnRPNP9o+9cOLE60z1NZTTXAVlvBpJM6ag1S6Hivd/lQ KBq3W7eOZEA5k04InXcQhLaTcuf+eeBCNgRz9oIeUvuy6yNbjo47NKT/ojX381zq j8dq6LzhPdHAJB4jmYiZJS5FAvGEOBdIzLQ0dxJPk1i2BEcLfnqOKQ0dU7g8BB6S mpEduHSlxKciyWOQNvOcl2oMsSqFDWbICejaov8zYdruEIWXS7nSJOTI3lLlYcKF YiHTLc0J0SAv00F3uygTRASFR9FQt3xzlY6ponV4JKp0LIxMMQz/U24mTM6p8wF2 zpdyuckSc5IUpr5z0iVbSSWRZb5fy1Ky5xZtsTXK9ghcSEiAvt73VZRbR6zvAtg4 3WWcJSgYCvBQYA+gCWBLq+3C/RER0MFO8GCv1gXSWZ4KoBQtnwS5MYJSm+sUwj1U BXk4Bm8EUATI1VcpJmQg5bgkyKG8kLzO9L0ONYVULBYgiYceEU2yTgXlzNGHVW4A 8OWNsqoB+AmSTuUUWcQNe1cZNz3aB/SZs0J95Zi8CntwcMCqtQBkumNY1aNJC1fQ xR9ZEHeq5PtR5jpXQYK0YovY4MO5bTCJHM9Eig+37xMOM1q2pdx9u0nWCILsfGV7 VrdWUt+3QckgLnRRnvITNa67CQ05C2wKmSaGzrnN+WeKswqfSVQ= =u08m -----END PGP SIGNATURE----- --cjrue5kcslvl7m5p--