From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
To: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
linuxppc-dev@lists.ozlabs.org
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>,
Venkat Rao Bagalkote <venkat88@linux.ibm.com>,
linux-kernel@vger.kernel.org,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Hari Bathini <hbathini@linux.ibm.com>
Subject: Re: [PATCHv2 3/3] powerpc/ptdump: Show the exec flag of kernel mappings on e500
Date: Tue, 17 Nov 2026 15:09:21 +0100 [thread overview]
Message-ID: <57c8caad-31d0-40f7-945b-f53908b811e3@kernel.org> (raw)
In-Reply-To: <074831f06e18d1b8cff91e7588aa7985077dd538.1794572365.git.ritesh.list@gmail.com>
Le 13/11/2026 à 13:31, Ritesh Harjani (IBM) a écrit :
> 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@gmail.com>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
> ---
> 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
>
prev parent reply other threads:[~2026-11-17 14:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 12:31 [PATCHv2 0/3] powerpc: kprobes insn page fixes Ritesh Harjani (IBM)
2026-11-13 12:31 ` [PATCHv2 1/3] powerpc/execmem: Don't leave kprobes insn pages W+X when CONFIG_MODULES=n Ritesh Harjani (IBM)
2026-11-17 14:08 ` Christophe Leroy (CS GROUP)
2026-11-13 12:31 ` [PATCHv2 2/3] powerpc/execmem: Allocate kprobes insn pages from the modules area on book3s/32 Ritesh Harjani (IBM)
2026-11-15 8:29 ` Mike Rapoport
2026-11-16 15:11 ` Christophe Leroy (CS GROUP)
2026-11-16 15:57 ` Mike Rapoport
2026-11-17 12:33 ` Ritesh Harjani
2026-11-17 14:04 ` Christophe Leroy (CS GROUP)
2026-11-17 14:15 ` Mike Rapoport
2026-11-13 12:31 ` [PATCHv2 3/3] powerpc/ptdump: Show the exec flag of kernel mappings on e500 Ritesh Harjani (IBM)
2026-11-17 14:09 ` Christophe Leroy (CS GROUP) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57c8caad-31d0-40f7-945b-f53908b811e3@kernel.org \
--to=chleroy@kernel.org \
--cc=hbathini@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=sshegde@linux.ibm.com \
--cc=venkat88@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®