Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2033412lqa; Tue, 30 Apr 2024 06:44:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV0LHfG/nVbPeQ/De+Ulp4+yllCmnC5UWQlvaxZ26xOXLpxIupLYV/YVhp4oGqR1YdT8Y1cinlDRMq6yXArzZBeziEUy1tof6q3mPdIVw== X-Google-Smtp-Source: AGHT+IESVSETiFd8gXRzBQAmN3GYyxh+YJbpjI9ZbZELNAZlHjS6h138jRcGan0Tfu3ol7d8Hw/E X-Received: by 2002:a17:903:2282:b0:1eb:2f02:cd0d with SMTP id b2-20020a170903228200b001eb2f02cd0dmr16150393plh.0.1714484680348; Tue, 30 Apr 2024 06:44:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714484680; cv=pass; d=google.com; s=arc-20160816; b=zdJJGI6rFeKbAr7FZqOqzoMB6zjd+tU6dcban3p91X9R1esO4c9qvi2MpwrICv8TNe 0hElcttzN0jVJHWd7/mthpiMIXFO2O8d/4UkQdlTIKr+V7mzy3YY5dHx9vimdDl6+G0i ElzML4OxSWLjC4RUJA/j8hhMDjMuRvsK6YHhwqIUhE+mvG4MRMAumPL3AzijBg36ObsX 38sy9+UYK+bOWUqtoJtr9MAKIdnoq5Uxyxko5Evlz8QCT4CP/pq24dHirCBY7r34isMy /aBowMyf8mKJZzF9KPMHJN3gBX6kATqaHJJuC2f5KFTKsNrMaBDHio5OA98OGX60txY3 F9Lg== 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=fDvzL+rLiub2UJlDrTC6De1txEPYe++pA5S9+UkQfyo=; fh=A5MvZ1bN4NABPmGzq/39uxmibSCOfvCMUC6Hd7m8llA=; b=DZ4EqD3mx2azYitginxumrLAvRsNy8TbeUoMz00Am8dZrh2xP4OsrM6FZGy5Zu9OC+ u0KpWX/bb3yJn2v5UViAMkspfeIsr//pPARiKGtC0fbh8B3rnsyxO/ZFC1ujmEttqURh XVE1nRy2h/KFbpIH9W//w9ECYAA0l7JlYUtPMHPjh23D8f1Jx6PoaXwOg82wg+tpXOFd 91/BaMeLRcsivhLN6mWgbquadUOPg2d6lGa447RiGEK7EgyQlQMtI1dEyImD6n9vpHfj mKx6BEFhg4t86nYp4pLzIvVA5BK9UH878+WaIEDTkzcbkPGyi85DvBjxqI9vtDWSHBZY aZsQ==; 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-164021-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164021-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 x11-20020a170902ec8b00b001e3e7148e5asi22833382plg.457.2024.04.30.06.44.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 06:44:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164021-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-164021-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164021-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 4A313286DAB for ; Tue, 30 Apr 2024 13:34:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56F0B42AA5; Tue, 30 Apr 2024 13:34:13 +0000 (UTC) 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.