Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3025545rwb; Mon, 15 Aug 2022 16:23:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR6HpXcd0a2PBMy8Bvq/c3FsERRkqlpJFn2OZ80h3AgvjwYXOyUc36OFbdPJ4nD/nMXqknPG X-Received: by 2002:aa7:d6da:0:b0:43f:99fb:f3aa with SMTP id x26-20020aa7d6da000000b0043f99fbf3aamr15892230edr.370.1660605814116; Mon, 15 Aug 2022 16:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605814; cv=none; d=google.com; s=arc-20160816; b=RoNW7DJ3IFYWFGPKuTyPc+EI0x8VfJCDzBx2JhDG11ek5KTMJwiSazzxey2yGRs+7N QmUl9CWphbHPd9czrpBG3YVktSvx7VrJMnMlhkns2HxSz/Aez8K2gYNHAg2zdjziJKPV dYQdignroQHKuqAD8j6HB60rT3IxGME67IfTK4Akv8XtRvE+GdQ1k7UzYBnwWwZYnYP3 EY/rH/U2R8xBE1VXxw+KrjVkWgo5bz8lg2OfC+rjjjNpV7vnklYeLY65xFbrt6EcXEJ1 BXdz0xav+4baOXOGJUjjYsKNmV2B45yt8V64sTfBpAZASP3wPwCinDTRlZ+c4p6Enwnc uF9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hQ+aAUo3YR/jJf99kKlM5B4kQt7202+peA8dnNd16zk=; b=XbepsR/lpRyXp07BXX+Hgf6tYvjNjtwHEeGrK3poZLMLs5okpyRpHeS6LqPM84PnLN JwwXIBqbRIRg9OotwLph7J4E9cDzHE3V9uiNpZ5KMi8qflIznpo4xYy+PjwTDiWE/VSV Tf0ReD+/vfpYJ6AyW3tsaygTF9e11m0sDZIIqyasiVKXCURIWM8DsUSRaZ2oHP56phHQ +8Hpt2dGaxQhBHoUvYN990S3VQVhoI25HG3w2SZLThixqrEs9PvJrZhES/VGs3C47oNw LMIZGMCnTvFq1FjJLKuJ4vi7DuiMnOPPm8sth4/A5MZy7VamFnF48L/JpTUaRzlE+a8b 9CPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IOd+G3lu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p37-20020a056402502500b0043c1908e995si8695341eda.113.2022.08.15.16.23.09; Mon, 15 Aug 2022 16:23:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IOd+G3lu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243787AbiHOUYt (ORCPT + 99 others); Mon, 15 Aug 2022 16:24:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346975AbiHOUQh (ORCPT ); Mon, 15 Aug 2022 16:16:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F7C996740; Mon, 15 Aug 2022 12:00:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 894D4B810A1; Mon, 15 Aug 2022 19:00:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99F3BC433C1; Mon, 15 Aug 2022 19:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590001; bh=3C0nmz2bwUw/YhMXl/4vqecM80SkN232zvqvmAcwXbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IOd+G3luXMEBFXJ8K6iKlUb42v+B4AkADjdBqZtsAb0fPetkraMIPHJCuetAjGv44 CsoZUZrISIa5Zi4/aFDE0GaaX9MNe1jOUb80DpsrE78PAktHY5I88ldY2OGaAxRNO5 TTE/WWPwYEZ4J9MlxOypOr+27n+U2WAXiA71cP90= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Michael Ellerman Subject: [PATCH 5.18 0118/1095] powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E Date: Mon, 15 Aug 2022 19:51:57 +0200 Message-Id: <20220815180434.466780189@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy commit dd8de84b57b02ba9c1fe530a6d916c0853f136bd upstream. On FSL_BOOK3E, _PAGE_RW is defined with two bits, one for user and one for supervisor. As soon as one of the two bits is set, the page has to be display as RW. But the way it is implemented today requires both bits to be set in order to display it as RW. Instead of display RW when _PAGE_RW bits are set and R otherwise, reverse the logic and display R when _PAGE_RW bits are all 0 and RW otherwise. This change has no impact on other platforms as _PAGE_RW is a single bit on all of them. Fixes: 8eb07b187000 ("powerpc/mm: Dump linux pagetables") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0c33b96317811edf691e81698aaee8fa45ec3449.1656427391.git.christophe.leroy@csgroup.eu Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/mm/ptdump/shared.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/powerpc/mm/ptdump/shared.c +++ b/arch/powerpc/mm/ptdump/shared.c @@ -17,9 +17,9 @@ static const struct flag_info flag_array .clear = " ", }, { .mask = _PAGE_RW, - .val = _PAGE_RW, - .set = "rw", - .clear = "r ", + .val = 0, + .set = "r ", + .clear = "rw", }, { .mask = _PAGE_EXEC, .val = _PAGE_EXEC,