Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3413426rwa; Tue, 23 Aug 2022 04:29:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR4aJe5C62U1WmR4hbFb/uz8jXDW/4z2VMYkdPoAAeyqPSNu5lvfUSdxSVf8GqTfbPGJHlnq X-Received: by 2002:a65:6a49:0:b0:429:88a0:4c04 with SMTP id o9-20020a656a49000000b0042988a04c04mr19888241pgu.566.1661254181544; Tue, 23 Aug 2022 04:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661254181; cv=none; d=google.com; s=arc-20160816; b=MxGMzPWRymKlmm2ifsqcW0q+1Ti/YuQI7j8nQmSs2FxeqtQMgvc4JkWFzVMsZVa47O Fq22LhWSWkKVo7ZP4Dhy8Jg8W7L6bKIuoIcMaQhiMd2QMx/bZjs7YmzmlcMLYNGWCTVd R4Dxfq3F+7AON6E7AXHhvF+fVrY93vekxkzmrDrKMFcfO7qIJtyCsgfk0+fGI8zWlZ/a tHo3HkJe2rpCKIhnrw0FOFkFtyjdwTnhFGC4/go0Pb954nA18LcHaURMa4m19T+C92K2 CSMlodg/EORzIwdojhTow+DQFwbQXEg/iYMhKcQWu0M27GJiPNPy5gXGlOzQABF0lKXH RpfQ== 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=3n6RAuODhMGL66Lm+IXyaR7ypX74LUhO4BDVzcVJtEA=; b=u2Yo5UtgIx7oeaDvDsWoSFsix37o50jqf/bopSZxWRnXmm01uYzcV5MsJQM7Svhf1p sBfu1k47sgHWc5gNa+EyLm/tSVWEBMHK9N+aVlN55vIhcP8c5pYh4sqCR2FFJtcCUmed Kn5UmphX3lhsVFNPrp2Gt+j87SKI7TaF7f/YrhbXD9+8eQ/QZp++AAvPNo0EA7/ehmCY sb0eweCJV1TXG3AEu9fKZcXuppQdVCsGxJtnvTVjskN6eE8dWZsmCO56dJzIMP2g0XWE 79DTHiIEseZqMAiZgGSRkgHS4KwClE0V2JkubysSD04PFCZJ/YFP4bnrv7QxiOFiS5Wh 8kkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cIoboEmj; 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 w71-20020a63824a000000b004292a037e9csi14845967pgd.241.2022.08.23.04.29.28; Tue, 23 Aug 2022 04:29:41 -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=cIoboEmj; 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 S1349693AbiHWKw7 (ORCPT + 99 others); Tue, 23 Aug 2022 06:52:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355840AbiHWKpV (ORCPT ); Tue, 23 Aug 2022 06:45:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E67A0275E0; Tue, 23 Aug 2022 02:11:03 -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 9F12AB81C4E; Tue, 23 Aug 2022 09:11:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F310FC433D6; Tue, 23 Aug 2022 09:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245861; bh=0Jt2oS8ajL4CdGUQpCZ3kNZmqzcv3sKuganqUxlGuhw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cIoboEmjQunT864OtrG3GjX3cWL/9mOW8zp136Dza2RIbluvL2us6Smtqb5vvld7C R7grxUlwdi/CPIi6f5UQouzAJQ0yKxDokM2dJwZOi0eKnWeFc2oy1zPf2CiWAz6tWT u6g0AlF6zzgYno5lryFS+NZ05twP/E0dPMXG4jmg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Michael Ellerman Subject: [PATCH 4.19 214/287] powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E Date: Tue, 23 Aug 2022 10:26:23 +0200 Message-Id: <20220823080108.163917288@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@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/dump_linuxpagetables-generic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/powerpc/mm/dump_linuxpagetables-generic.c +++ b/arch/powerpc/mm/dump_linuxpagetables-generic.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", }, { #ifndef CONFIG_PPC_BOOK3S_32 .mask = _PAGE_EXEC,