Skip to contentSkip to conversation

FAILED: patch "[PATCH] powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E" failed to apply to 4.19-stable tree

PATCH [email protected] 2 participants 3 messages Aug 13, 2022 – Aug 19, 2022

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From dd8de84b57b02ba9c1fe530a6d916c0853f136bd Mon Sep 17 00:00:00 2001
From: Christophe Leroy <[email protected]>
Date: Tue, 28 Jun 2022 16:43:35 +0200
Subject: [PATCH] powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E

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.

arch/powerpc/mm/ptdump/shared.c +3 -3
index 03607ab90c66..f884760ca5cf 100644
@@ -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,
#1 lore raw

Le 13/08/2022 à 16:38, [email protected] a écrit :

Quoted 7 lines

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

For 4.19, not worth the effort to backport without commit 97026b5a5ac26541b3d294146f5c941491a9e609

With that commit applied, no conflict is observed:

[chleroy@PO20335 linux-powerpc]$ git log -1 --oneline 5c7ccbe1aade (HEAD -> linux-4.19.y, tag: v4.19.255, stable/linux-4.19.y) Linux 4.19.255

[chleroy@PO20335 linux-powerpc]$ git cherry-pick 97026b5a5ac26541b3d294146f5c941491a9e609
Fusion automatique de arch/powerpc/mm/dump_linuxpagetables.c [linux-4.19.y 55605f963e22] powerpc/mm: Split dump_pagelinuxtables flag_array table
Author: Christophe Leroy <[email protected]>
Date: Tue Oct 9 13:51:58 2018 +0000

  6 files changed, 307 insertions(+), 153 deletions(-)

create mode 100644 arch/powerpc/mm/dump_linuxpagetables-8xx.c create mode 100644 arch/powerpc/mm/dump_linuxpagetables-book3s64.c create mode 100644 arch/powerpc/mm/dump_linuxpagetables-generic.c create mode 100644 arch/powerpc/mm/dump_linuxpagetables.h

[chleroy@PO20335 linux-powerpc]$ git cherry-pick dd8de84b57b02ba9c1fe530a6d916c0853f136bd
Fusion automatique de arch/powerpc/mm/dump_linuxpagetables-generic.c [linux-4.19.y 864f14f5b787] powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E
Date: Tue Jun 28 16:43:35 2022 +0200

  1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 46 lines

greg k-h

------------------ original commit in Linus's tree ------------------

From dd8de84b57b02ba9c1fe530a6d916c0853f136bd Mon Sep 17 00:00:00 2001
From: Christophe Leroy <[email protected]>
Date: Tue, 28 Jun 2022 16:43:35 +0200
Subject: [PATCH] powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E

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.

arch/powerpc/mm/ptdump/shared.c +3 -3
index 03607ab90c66..f884760ca5cf 100644
@@ -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,
author maintainer
#2 lore raw
Quoted 33 lines · Christophe Leroy

Le 13/08/2022 à 16:38, [email protected] a écrit :

Quoted 7 lines

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

For 4.19, not worth the effort to backport without commit 97026b5a5ac26541b3d294146f5c941491a9e609

With that commit applied, no conflict is observed:

[chleroy@PO20335 linux-powerpc]$ git log -1 --oneline 5c7ccbe1aade (HEAD -> linux-4.19.y, tag: v4.19.255, stable/linux-4.19.y) Linux 4.19.255

[chleroy@PO20335 linux-powerpc]$ git cherry-pick 97026b5a5ac26541b3d294146f5c941491a9e609
Fusion automatique de arch/powerpc/mm/dump_linuxpagetables.c [linux-4.19.y 55605f963e22] powerpc/mm: Split dump_pagelinuxtables flag_array table
Author: Christophe Leroy <[email protected]>
Date: Tue Oct 9 13:51:58 2018 +0000

  6 files changed, 307 insertions(+), 153 deletions(-)

create mode 100644 arch/powerpc/mm/dump_linuxpagetables-8xx.c create mode 100644 arch/powerpc/mm/dump_linuxpagetables-book3s64.c create mode 100644 arch/powerpc/mm/dump_linuxpagetables-generic.c create mode 100644 arch/powerpc/mm/dump_linuxpagetables.h

Quoted 8 lines

[chleroy@PO20335 linux-powerpc]$ git cherry-pick dd8de84b57b02ba9c1fe530a6d916c0853f136bd
Fusion automatique de arch/powerpc/mm/dump_linuxpagetables-generic.c [linux-4.19.y 864f14f5b787] powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E
Date: Tue Jun 28 16:43:35 2022 +0200

  1 file changed, 3 insertions(+), 3 deletions(-)

Thanks, that worked.

greg k-h