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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58194C27C53 for ; Wed, 19 Jun 2024 15:14:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Hy7mDqdAWafcs1qGDk1fGljym0z2vpyMdJE6eXEL4yw=; b=D3XwuuZDjvyF2oTjKHOm1djWPw PIgLsn6CWaqoMXtKSyVg4Xb10LLyURxsu7ufNyBe6U+6TvWplTW+1obEZtNgGYguW56uo4F4fyYhe vNo/RcsvadN+GJvZfWv5K2wqLNECszb+XaChIazgWH469f29QBuAX5o6MGr911VcWWzxM45HzItlZ Y2XM2M/wy1XLcpqhGPjtM+wTeLojOEskiHpmEZCYiGKzC/eMEiQavbr0hPBVeU8gMaAnY/e8LkN52 oczXAVIvZhI8bzWHi57Qje1CgElri2r/gIYGqMLVV5tfOsfMsqM5o18GBu2N6mEVcbeVt46M4Jrir iKjmL+sA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJx0Q-00000001knS-1Ima; Wed, 19 Jun 2024 15:13:50 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJx0M-00000001kl4-0Lnd for linux-arm-kernel@lists.infradead.org; Wed, 19 Jun 2024 15:13:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 28586CE2049; Wed, 19 Jun 2024 15:13:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF8AFC2BBFC; Wed, 19 Jun 2024 15:13:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718810022; bh=1qztgBft53rqcmNqn+WqrRmoziJvlMVftHqXvinY56M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qpZU3Td1z0AmYKrzHgxPUgr4670EZEFVDD1iBWs3wUUkRiLfHlfTA+eUt7KLX5sRW pI+S2DILnH4qhUFD4xwLY1E2093dHB4hghyXDAd8c4rnEZmfFcdUxjluPG+MxR10qd VoHj0MNhFtdqtzU+4r3DPuqc8Dt/GJU97IxsvCSYhxZQtyfMUYmEKludN5bPL8/n74 OsMkL4yMLwJ8LP/SbmQTZv1Sx482RW4dWSgR0fmFnFdBS//bI+c5hgH7ncE35yM5ne ezrkhspGX6hoZIYX/2tTt3Es0ibls3IYc69hZRH+YRhAERFp8HHYYsXS+NT6d07//2 fDSZ0jxWyJB3w== From: Will Deacon To: Catalin Marinas , Mark Rutland , Peter Xu , Ryan Roberts Cc: kernel-team@android.com, Will Deacon , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1] arm64: mm: Permit PTE SW bits to change in live mappings Date: Wed, 19 Jun 2024 16:13:36 +0100 Message-Id: <171880230437.492258.14563245801501975487.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240619121859.4153966-1-ryan.roberts@arm.com> References: <20240619121859.4153966-1-ryan.roberts@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_081346_644826_F8A16242 X-CRM114-Status: GOOD ( 12.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 19 Jun 2024 13:18:56 +0100, Ryan Roberts wrote: > Previously pgattr_change_is_safe() was overly-strict and complained > (e.g. "[ 116.262743] __check_safe_pte_update: unsafe attribute change: > 0x0560000043768fc3 -> 0x0160000043768fc3") if it saw any SW bits change > in a live PTE. There is no such restriction on SW bits in the Arm ARM. > > Until now, no SW bits have been updated in live mappings via the > set_ptes() route. PTE_DIRTY would be updated live, but this is handled > by ptep_set_access_flags() which does not call pgattr_change_is_safe(). > However, with the introduction of uffd-wp for arm64, there is core-mm > code that does ptep_get(); pte_clear_uffd_wp(); set_ptes(); which > triggers this false warning. > > [...] This looks good to me, so I've picked it up. However, I see that Peter just replied with some comments, so I'll keep an eye on that discussion in case we need to respin. But, for now: Applied to arm64 (for-next/fixes), thanks! [1/1] arm64: mm: Permit PTE SW bits to change in live mappings https://git.kernel.org/arm64/c/895a37028a48 Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev