Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp441743lqh; Tue, 7 May 2024 04:10:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXwl7yUdnL1JvcDlupYeVSCvL5d3PsoWp9ZyIHXF4zD6o6qeHR9y+TmFDtNnwDVPthKIrYPMfke1KdgBiZh/ng0UmohAo5e8vRdW5icYA== X-Google-Smtp-Source: AGHT+IG1fz0AU3Zwtvh+u/DRq03Ivq3EYHBwSuk88yfTijaMZJW76c2BDv+ZhnvPr6k6Te57owH4 X-Received: by 2002:a17:903:18d:b0:1dd:c288:899f with SMTP id z13-20020a170903018d00b001ddc288899fmr15548489plg.18.1715080246151; Tue, 07 May 2024 04:10:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715080246; cv=pass; d=google.com; s=arc-20160816; b=bmnUkERuUUafFjEZuqvOTSH/sKSWuhjhl0Xgg5hhLxNT77HQJYcyddnlk2opvaT+0j ZxBS3yh+JPMPEh3RTd+vdsdbtIjUxykICNHvwDq5AahDemqGSpngfaTfCyZbOrKt/ulm bRo+en+nosUlhUpv2cAH4mgcoILYhcTvW/Ci/g6R8AYDK8GOTmYjx/iVm7rcwGHxyyxn Xc2HmmpyAaTtkKN5yONcL/GdV9spGDiPV+8dkC03CWEwUqHhz6kfivbOuxvScwfPxcqS PHM5Lcy8ownUqR7+09vlToFlKcFEcsv1Kgu/IDqybHfiiufncpRl0YrEn542V/3CUqgk dGEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=Zwwh9vkkTaYwuxechWQZBiqi3K2CQn5fkGbn5iaWe90=; fh=lwvrzpLHaiNANPOeD/kjiqdjG2i/DJ5t/nrLYMzt2ac=; b=1E8qXBwbCx49SmCHIkvM3gibm/I5YY6p/xyy942r/16j+6/+eYMRF4u9frNkWOBDLK 4qAzsyrqlWDr/THRE39OHeUMRlkbLSTpsVnIlSJbpFmahbkPtnHqOYAZr+alA7jy5iA0 N1If1S8tyMU/RDnRCf5PCHe9yqvSpRfEGEclAbkS9hZTCpAnj+/DWgqF3v9A+PjzbwnT dRAowvPmDsMXOn38xMaaP6UGGeD+HQni6Tv6I0O9iy+NgPJ92XqMcE3SJubjFWloquBH i8TvcegMdNRrNADnVVbPJICQyVl3yrJEZouduov1f+anMUp1plMAhLsS+PmZPj5J81iz hgQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NGTLWUjW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171170-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u2-20020a170902e5c200b001e3f2cfa098si10304036plf.278.2024.05.07.04.10.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 04:10:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171170-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NGTLWUjW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171170-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5D03528722B for ; Tue, 7 May 2024 11:08:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7045A1514D9; Tue, 7 May 2024 11:07:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NGTLWUjW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D38214EC7E for ; Tue, 7 May 2024 11:07:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715080076; cv=none; b=BdWxeYkXD+f8aSUmlw75mGyjAlZsIUBMyQUTFIkThp7Ti5dRT/mYNRcO3h8oHF0302MNGOREa8uLdQ+L5XTklQ3ynCEB0Jol3TJUJv6KTtp1pgrP0NNAXDLU0BP664d+blVjnHVuj6igBNpHN/MTMo9tLFepRraLPpSeT+dg4dU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715080076; c=relaxed/simple; bh=S9ifMyIc/2l0riD80uqAnf/tEvx709LrU9Nf/MYynYs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=A4+37SddqpSdL2E/SQkb+iT1GDXnyOGJICy/6jZPEI6/ZTJbpXz3dcbazNm55XPY3/sJ3eo24ShTsiqt7V6alvu/XscvpgisSuO/ePSqZg3PG8KXWC1ej9+T9RAdRCdaa7WqNm8BayB/SSwtlYYNif7n90/qpsTBGR358S9v4+g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NGTLWUjW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E03C8C2BBFC; Tue, 7 May 2024 11:07:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715080076; bh=S9ifMyIc/2l0riD80uqAnf/tEvx709LrU9Nf/MYynYs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NGTLWUjW0Mjcb/7e6mzoWpEdxm76Vj/2h6bM/bKlhMJ3UrBMeKASmCfZ1kXHGJRY6 i6mPVj9211oNXFKmfkj71WSAdo2IvypGqS86JiU6vbZHj9R8E7Uno+nQBcpvYX02os zRUSvlK0VmrtLVxOqXLiX/v6206ZEkAiJHxJ372+ImhBENWgwfyUe6opxNzYphq6Fw BrxDpBzVKY8UzazFL8WoOzfzpz2EugPmsJ8rl/6JxGj90NltkHtKof9CNnu91Zd0RB Yl69ZQihTFE08cyf8Ztvlxg4IkXv39KuTpe6r83/QSnlNIljGkgpMEFkhKpEIkqNf3 uzZiN/MO0eK0w== Date: Tue, 7 May 2024 12:07:50 +0100 From: Will Deacon To: Ryan Roberts Cc: Catalin Marinas , Joey Gouly , Ard Biesheuvel , Mark Rutland , Anshuman Khandual , David Hildenbrand , Peter Xu , Mike Rapoport , Shivansh Vij , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/4] arm64/mm: Enable userfaultfd write-protect Message-ID: <20240507110750.GA22289@willie-the-truck> References: <20240503144604.151095-1-ryan.roberts@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240503144604.151095-1-ryan.roberts@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Hi Ryan, On Fri, May 03, 2024 at 03:45:58PM +0100, Ryan Roberts wrote: > This series adds uffd write-protect support for arm64. > > Previous attempts to add uffd-wp (and soft-dirty) have failed because of a > perceived lack of available PTE SW bits. However it actually turns out that > there are 2 available but they are hidden. PTE_PROT_NONE was previously > occupying a SW bit, but can be moved, freeing up the SW bit. Bit 63 is marked as > "IGNORED" in the Arm ARM, but it does not currently indicate "reserved for SW > use" like it does for the other SW bits. I've confirmed with the spec owner that > this is an oversight; the bit is intended to be reserved for SW use and the spec > will clarify this in a future update. > > So now we have two spare bits; patch 4 enables uffd-wp on arm64, using the SW > bit freed up by moving PTE_PROT_NONE. This leaves bit 63 spare for future use > (e.g. soft-dirty - see RFC at [4] - or some other usage). > > --- > > This applies on top of v6.9-rc5. I chucked this into the CI on Friday and it looks to have survived the long weekend, so I've gone ahead and merged it into for-next/core. Short of any last minute failures (touch wood), this should land in 6.10. Thanks! Will