Re: [PATCH] [backport for 4.14] powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E

From: Greg KH
Date: Fri Aug 19 2022 - 07:14:49 EST


On Tue, Aug 16, 2022 at 10:45:29AM +0200, Christophe Leroy wrote:
> [ Upstream commit dd8de84b57b02ba9c1fe530a6d916c0853f136bd ]
>
> 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@xxxxxxxxxxxxxxx
> Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
> Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> Link: https://lore.kernel.org/r/0c33b96317811edf691e81698aaee8fa45ec3449.1656427391.git.christophe.leroy@xxxxxxxxxx
> ---
> arch/powerpc/mm/dump_linuxpagetables.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>

Now queued up.

greg k-h