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 92AB0E95A91 for ; Mon, 9 Oct 2023 08:46:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 16B368D001E; Mon, 9 Oct 2023 04:46:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 11BCC8D0001; Mon, 9 Oct 2023 04:46:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 00B008D001E; Mon, 9 Oct 2023 04:46:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E2DB28D0001 for ; Mon, 9 Oct 2023 04:46:11 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id C05F11CA48B for ; Mon, 9 Oct 2023 08:46:11 +0000 (UTC) X-FDA: 81325290942.29.02F8710 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf03.hostedemail.com (Postfix) with ESMTP id 0038E2001A for ; Mon, 9 Oct 2023 08:46:09 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=I3dYy1Ko; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf03.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696841170; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=kXfaBK5peuda3ld2EGc+YRwDY6sTqHJz/+w8jFXTAYc=; b=c9j0OruMXEAACHc65Xps3wwwl4z2RXGtFOnbAK0w6ORNVW8ohVuikyBSGeZRaI2Om6lRyk XtVekrus3MfK7lYq+a60gq4Lb214FPP50XDmtMX3uarQKYUR3FCC99dNrzSsY/Yc4GRevZ QkpIM2oK6c8MtOttlaLrpX0qe7DXgIc= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=I3dYy1Ko; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf03.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696841170; a=rsa-sha256; cv=none; b=zQEes+jpAXV9q2h+0pktA4ju0+8zN81SxR9K75EDE00rKhDhlIB8bcBvj1cppCOsHNSban AZTM1lGnBdOiTovveipRSD5lbLNY0NINXQXitZtJmcq1msttEhhIQiWtEle6L+oXJwyS3X gqg6zgrwx61WO8tnib6PG649XVCQ2ek= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 85384B80EDB; Mon, 9 Oct 2023 08:46:08 +0000 (UTC) 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-Rspamd-Queue-Id: 0038E2001A X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: zopz9zocmzxhpjw5fqoygijtdinht7r1 X-HE-Tag: 1696841169-97389 X-HE-Meta: U2FsdGVkX18qdD3eNxLqH2nP6ubuhiJQBJJyr4QsJONXTdZ9icbiG+6OVsaD/kcRmGIoi7bUJCyR4qjbsIYyynOM/ALHXLn6r2fiSWf6uetpuYvlFTWSsRKQ335zaqZPrDFPalO9ungk3L5v5k9V+RjWensiLYwSNOA1KoeIAxfZboSix2EFVAMnuCGPn7XtEYTVGB0AMuuyxg8VrBqwjqHF0HxvS2Ugd3MdOtr/f+Od71AHUbj18+6jz4ILacPbt6jnXEgGGie9W5/9lR/mkZ4bqqgrm3kMSX7Hl24DEDlToGQMORzBNmBzucs3PsXCr1LFsCEjXZVFumEEKjG3mawDf7iLGLPonboegBj/s60IHr8+ljqOEptD9w0ROlJ7KpjcYBkidtCztYrmSPFIywxfINBXjhWIUqsZL7iK30QC+CdRZKY809hZGtatwkYQEifZo/R9dOlvESPfl7UDOLtfA06V3vMOUqeKgKKwuq/Ryz4yQfoH+7kQl4rr1Gwo8JxEaLZcsexLkJylAASFqJ1OaJFOyx4SBsQkSEgaWUdMd2Z5A5tNFHn4ot4dYoRLbgmSJfBlxpsMwri1wicOYo4kOlk6ZEI+rR+0JH0EKlyMEgdTWTi8y6iVQhSVmPCvF5IuIQNKm12IxMAZ+08Rb6xA1mzcz9mlt8j8sOzXUyk6g0yD6lx7F21gYp+UdvsSEgag5JTuClhv4XzAbBYWbyZuf0WJ05p04axv00gdV6nxxG3MZLC3RwUGyeUobUiO02vrk2QDlY+FyD98mVJnrfFvHpqfK9puwo8YFF56uMRWFsovBCJA+2zXFFU3kdxUdrI1vNC/t2qOsgklZy9qDo5agFgQZlRrHrycNBJ5/ApN2TkHY4i7Exn8MMHej4UhV5LgYZxrDZQ/PIEWbwDv4l+dutlsYtUlYVDFYsLLLQmVQSwb/GLoxAzXNgphi5tJi3pJBqfGMxrf6nURlPQ f2rMeyY3 WA+yOmR7LlbmK0mlah6w/EMIsaAh8R5QAOdsrW2xiegkFfLsY3WlKW/Vw4gucQIN5A9ac4N38LEGCJq++zuJFnJQJfQQT4ABSjXMtWWMcf/o6KHHKq2CBWBj8qucDOYlC3cTvNP1iIClfisb3S2PCX3j9G+URzJRFwFKKqv+/i6zuAH8kuG56pcSF7LOU4wSi/Qgydlc2gSGeRfzgjBKu53TuKX3pOG1rLhEWEz1EH+reCbJRYMc4HEqsaArUS6/4iLumVbF0a6m5GRu8RYv7SaRdTNQZjUS8AROvmEcz06knocO6lEQ2GWHgbHKixyQZEDE6 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 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.