Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2813885rwb; Mon, 15 Aug 2022 11:52:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR6H5x+jvp4B+V8J49k7h9FZltoM8LWDJUJAU2eCYQWc3Qf5toyiVNN1BxSQUTmaNuz7aIm/ X-Received: by 2002:a17:907:3f0a:b0:730:994f:8d57 with SMTP id hq10-20020a1709073f0a00b00730994f8d57mr10982643ejc.538.1660589578461; Mon, 15 Aug 2022 11:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589578; cv=none; d=google.com; s=arc-20160816; b=yKFp3lR5ccBN2vW4BsLEib4rUO89Uq1THrp0uEf0afdhAjLp/RbSgNTqNxSC/WmmBW aUtjfz489BeZ8eAwwTk0l/Nt2bs81mFuHurhFVuBgdD8Jv0lPM9CgZ4ExWMtSw0bRNtK nND0WS7qdzCaHspdvZH6tcMMxUXtNcFhTnZtwAK2F3fBOZuhDnxecztTXE3P8S57y7YR 8MEidylm89FTVUw8YfWqYpGB2ULXtghwopJHoiWZchFNtDAfEMdvP6gTBhyMybg0eDKm 9Ds86EjnupgxSKp3lE/HlZmKx1rkT6OBxRf28a8Vgcv6XSxJKvlGqwZ7GvJFfiOaDQ5A XnLg== 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=JjVCWerkoTa4RyAb2RR/u4CffhQ4QaKkdtmGzmIH9FA1tte2MRtyqnzbI94lC9SJQ7 /EtkKflPPBYqd0mzOsubMwX9A0L3G9iiEMrEDPpa1CbeYAPxSOLkDpi+h6nONPYQWPcf +C1eS2J4JwutGR+32OeuAsUkBuo9JrxObAesasmDTsuJ60VQu7vWzvIOrfU+o3ngXJFn w7tncz9WdLIGZ+/t17raQFf64OZ/eoDmcqa366K1FPnw82193YRSfOWINbKVXu0UUPIr FD3JtznpYiJcZQv166CFBf+BUFSx/cpWkIZSp8eEx++loQ1/IR2kqFrhh9A2D0/PirkA RilA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="iDCTkh/1"; 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 fy15-20020a170906b7cf00b007309350f2f9si6948471ejb.555.2022.08.15.11.52.29; Mon, 15 Aug 2022 11:52:58 -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="iDCTkh/1"; 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 S242825AbiHOS3w (ORCPT + 99 others); Mon, 15 Aug 2022 14:29:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233038AbiHOS2m (ORCPT ); Mon, 15 Aug 2022 14:28:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 897B9C36; Mon, 15 Aug 2022 11:20:18 -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 dfw.source.kernel.org (Postfix) with ESMTPS id D76E060ABC; Mon, 15 Aug 2022 18:19:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD849C433C1; Mon, 15 Aug 2022 18:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587570; bh=3C0nmz2bwUw/YhMXl/4vqecM80SkN232zvqvmAcwXbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iDCTkh/1/E1uZc/tqou3A6rB2nStNdNkZlbjRl1yaqf7u1HW5kh896eV2bRuN4iTh Z9hzE2CtP/OGQ/feMxVwbS4jkyyOiDN0EXJsx0lzCV5ozoa8Ld7gzQy+AIkRQBW+RM /mwT1P3WmMe/VQjxkKBj3+4JaOB3a5N8e3dAesQk= 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.15 095/779] powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E Date: Mon, 15 Aug 2022 19:55:39 +0200 Message-Id: <20220815180341.361786474@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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,