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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23D9AC433EF for ; Wed, 17 Nov 2021 11:25:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05D4D61B97 for ; Wed, 17 Nov 2021 11:25:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236776AbhKQL2j (ORCPT ); Wed, 17 Nov 2021 06:28:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234371AbhKQL2i (ORCPT ); Wed, 17 Nov 2021 06:28:38 -0500 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee2:21ea]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F29AC061570; Wed, 17 Nov 2021 03:25:39 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4HvLFr4hkdz4xdS; Wed, 17 Nov 2021 22:25:36 +1100 (AEDT) From: Michael Ellerman To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: Subject: Re: [PATCH] powerpc/8xx: Fix pinned TLBs with CONFIG_STRICT_KERNEL_RWX Message-Id: <163714821663.1508509.919431268872483842.b4-ty@ellerman.id.au> Date: Wed, 17 Nov 2021 22:23:36 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 Nov 2021 09:08:36 +0100, Christophe Leroy wrote: > As spotted and explained in commit c12ab8dbc492 ("powerpc/8xx: Fix > Oops with STRICT_KERNEL_RWX without DEBUG_RODATA_TEST"), the selection > of STRICT_KERNEL_RWX without selecting DEBUG_RODATA_TEST has spotted > the lack of the DIRTY bit in the pinned kernel data TLBs. > > This problem should have been detected a lot earlier if things had > been working as expected. But due to an incredible level of chance or > mishap, this went undetected because of a set of bugs: In fact the > DTLBs were not pinned, because instead of setting the reserve bit > in MD_CTR, it was set in MI_CTR that is the register for ITLBs. > > [...] Applied to powerpc/fixes. [1/1] powerpc/8xx: Fix pinned TLBs with CONFIG_STRICT_KERNEL_RWX https://git.kernel.org/powerpc/c/1e35eba4055149c578baf0318d2f2f89ea3c44a0 cheers