From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9E9512D776 for ; Tue, 30 Apr 2024 13:34:10 +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=1714484052; cv=none; b=FA3+WWM9ET+cUlZjdsHLCMSXDNMItsLKrJ+4pmUzyGw64cfVMynI0I17I8BtaNbnUcz0T68FPKo+RfqLYz5KdxN/VegvDxfHLPVFsnP7G/eqIsgbCuNCyvayj8mSubYiRZzIP5+T31PuEFPCdpN+4s6P3SVpk/55DnR1HoBbr7g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714484052; c=relaxed/simple; bh=OsYliPdbKS2RCt5sTywXCV7rvL0tdlr+8mSnbVv/184=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Am74au0VXd7450EW+bez+kNIdXnAMb4kwS3AuvQpTuJ4Q3/ldvIQmJRN5nVMvrVmvK98w95uZHvoKfsPcRq1ZQBznSMZUWCOrE1DYK5F8tz9lF8diDodzEQGjsMj43X2WhgBQPNmvxer01XpU6nRsjxHBclXv5GLktZnpLzIihM= 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 B50552F4; Tue, 30 Apr 2024 06:34:36 -0700 (PDT) Received: from [10.1.38.140] (XHFQ2J9959.cambridge.arm.com [10.1.38.140]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C3F393F793; Tue, 30 Apr 2024 06:34:08 -0700 (PDT) Message-ID: <3a1669be-2cf4-486c-901a-3350cf7ffd25@arm.com> Date: Tue, 30 Apr 2024 14:34:07 +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 v2 1/3] arm64/mm: Refactor PMD_PRESENT_INVALID and PTE_PROT_NONE bits Content-Language: en-GB To: Catalin Marinas Cc: Will Deacon , 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: <20240429140208.238056-1-ryan.roberts@arm.com> <20240429140208.238056-2-ryan.roberts@arm.com> <839d6975-ce12-4fc9-aa3b-8ec5787bf577@arm.com> <8cf74e5f-e6a5-465e-83b4-205233c78005@arm.com> From: Ryan Roberts In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 30/04/2024 14:28, Catalin Marinas wrote: > On Tue, Apr 30, 2024 at 12:35:49PM +0100, Ryan Roberts wrote: >> There is still one problem I need to resolve; During this work I discovered that >> core-mm can call pmd_mkinvalid() for swap pmds. On arm64 this will turn the swap >> pmd into a present pmd, and BadThings can happen in GUP-fast (and any other >> lockless SW table walkers). My original fix modified core-mm to only call >> pmd_mkinvalid() for present pmds. But discussion over there has shown that arm64 >> is the only arch that cannot handle this. So I've been convinced that it's >> probably more robust to make arm64 handle it gracefully and add tests to >> debug_vm_pgtable.c to check for this. Patch incoming shortly, but it will cause >> a conflict with this series. So I'll send a v2 of this once that fix is accepted. > > Sounds fine. I can queue the arm64 pmd_mkinvalid() fix for 6.9 and you > can base this series on top. But I have a preference for this patchset > to sit in -next for a bit anyway, so it might be 6.11 material. Yeah that works for me. I just sent the pmd_mkinvalid() fix.