Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1754448lqm; Fri, 3 May 2024 05:54:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWgXhDS45yB547024q8qBteFKHJ9+D9euy3jVAZwCywvtpRxguueyEMTim+LvFAoiae3LtJOiqyNZYmDLzOMPjBCMawlrijuNMxU/OQdA== X-Google-Smtp-Source: AGHT+IHFzYtjKlolzN+DIn8TlL/RK6Ux+20Giwmjmww7asseUzsy8XEjf/DgSj29ni9Pg5PmuBto X-Received: by 2002:a17:902:f7c1:b0:1ec:2977:d934 with SMTP id h1-20020a170902f7c100b001ec2977d934mr2211847plw.62.1714740850516; Fri, 03 May 2024 05:54:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714740850; cv=pass; d=google.com; s=arc-20160816; b=diJUkQPga2jG/oV13aSgGZ9kn3VZgK9ajH/kVZneFi1VCzM7R4yNref8m9EW2J+YxE I23DDY/GjtzXOwGNy60gvfvnoP+DjiqWJnZAOwF84VD+uK+T4VrTdz87f+r2h7cG50RL D1ymF3PRitdo0EPcQ/Di0HuQTvH79vwSOJ3YWVE/SvA+m92mG0bmma2vHnHKzyImz1hb 2/4Kpedgn/TcX/Tsc/dG9wLAOPgwZNywgkcCXg/lPVkuEYpWIdmBguOK+HcS84VFboTc vjwIY21MgwQQNke1pTnYoMqa90cpHVkTlHLmEPdDqH0VLD/QyqagH1ryRLmQGDX9VoMn CRpQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=2GPL7mn3MJ7BSm9u9rQoIYJC+/oEywtpjJ2+HJQFITc=; fh=r3S/RTeiQ2zWnpJfpIAD9jSI7SX8E2IzJZsno0Mj8QA=; b=KOjveQ4wV4axSU3kSinxrwg3cSOOG+X+RtUhXgrWB1Z8Z/gYDtA3NVcHrRKS9Vaeqa zXZALz4kUWauevYgT/JAf6RF/8DVGSiZRlTGAKfspzwAJettZfyIpbhhCL2dHCLmEWgP SikJcq+uFmiM+O0DRJVC7bNFG3dHQTn2I9X/wlHaae4TykEzgbsdLN0Z+9Dqyq9QvoHF 2CxuEE/HOTp3O7xrhOzW/O8w3OTwz54qNxPgZQTqV2qZv1snAIDpejS0SVf5iaiyCKv7 wZji/bFummgqvl6YuG8t5j76iqFfxopB6CtXn6ifqaq9mpxJBcTXh5pRXa7sUG/sQfxM E1pA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-167656-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167656-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d1-20020a170902c18100b001ead2e6f531si2787904pld.220.2024.05.03.05.54.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 05:54:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167656-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-167656-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167656-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 2B87E281EB0 for ; Fri, 3 May 2024 12:54:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 449C1153579; Fri, 3 May 2024 12:54:05 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 852D714267 for ; Fri, 3 May 2024 12:54:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714740844; cv=none; b=Rs8fSCNEsQr7JzCH+4rRlfHjosH6eL35KAkcb90HWVDjivEOLND6VYL2jqIoObHXPDPjO+lobBh04859+Gi3BpIyhnJOEcuWZAUN6z27CbL3SHO2K+Q/v6sXCXnbG8H/msHiTMd+fzeqDGyMhvDe/mKChG/LObas5B6UzLbeIRk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714740844; c=relaxed/simple; bh=+6EYlFhVT+kjGVbBnNFDCmPqWr5uEiMz55mkta0KrdA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=j/ii3Ax9ve3L2pt96W6cEwSO4iiVzKA2AuFlUuku3w1pKVwgwEJHJ+I5qn/fIF1scPEIl2lhM5kv4GYrBuOucdbZ+u5F9TnXf8cUc9ANEOWWqT8ksoWlS/GaEMPPg3dfkUN3s1Bj3yMN71KbIE39EAAQaNaxlSnQTIlUwySUs5M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 38B5F13D5; Fri, 3 May 2024 05:54:28 -0700 (PDT) Received: from [10.57.67.51] (unknown [10.57.67.51]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4EE3A3F73F; Fri, 3 May 2024 05:54:01 -0700 (PDT) Message-ID: <345b3d66-9c18-4a25-8b1f-a84aafac5156@arm.com> Date: Fri, 3 May 2024 13:53:59 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/3] arm64/mm: Enable userfaultfd write-protect Content-Language: en-GB To: Will Deacon 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 References: <20240501145419.1390363-1-ryan.roberts@arm.com> <20240503120104.GA18156@willie-the-truck> From: Ryan Roberts In-Reply-To: <20240503120104.GA18156@willie-the-truck> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 03/05/2024 13:01, Will Deacon wrote: > Hi Ryan, > > On Wed, May 01, 2024 at 03:54:16PM +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 3 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 [3] - or some other usage). > > Thanks, I think this series looks really good now. > > From your discussion with Anshuman, it sounds like you're going to post > a new version with the first patch split up so I'll wait for that. Yep, I'll try to get that out this afternoon. Thanks! > > Will