[PATCHv2 3/3] powerpc/ptdump: Show the exec flag of kernel mappings on e500
From: Ritesh Harjani (IBM)
Date: Fri Nov 13 2026 - 13:51:20 EST
On e500, _PAGE_EXEC is made of two bits, _PAGE_BAP_SX and _PAGE_BAP_UX,
and a kernel mapping only has _PAGE_BAP_SX (supervisor bit). The flag
table requires all the bits of the mask to be set to print "X", so
kernel_page_tables never shows a kernel mapping as executable:
w/o this patch:
0xf1015000-0xf1015fff 0x00000000 4K PTE r present coherent accessed
Print "X" when any of the bits is set the same way it is done for
_PAGE_READ and _PAGE_WRITE:
with this patch:
0xf1015000-0xf1015fff 0x00000000 4K PTE r X present coherent accessed
This only changes what is displayed. ptdump_check_wx() uses pte_exec()
which already tests for either of the bits.
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@xxxxxxxxx>
---
arch/powerpc/mm/ptdump/shared.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/mm/ptdump/shared.c b/arch/powerpc/mm/ptdump/shared.c
index edc69da19b85..e28a41a8b1ac 100644
--- a/arch/powerpc/mm/ptdump/shared.c
+++ b/arch/powerpc/mm/ptdump/shared.c
@@ -22,9 +22,9 @@ static const struct flag_info flag_array[] = {
.clear = "w",
}, {
.mask = _PAGE_EXEC,
- .val = _PAGE_EXEC,
- .set = " X ",
- .clear = " ",
+ .val = 0,
+ .set = " ",
+ .clear = " X ",
}, {
.mask = _PAGE_PRESENT,
.val = _PAGE_PRESENT,
--
2.39.5