From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Russell Currey <ruscur@russell.cc>,
linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au
Cc: Julia.Lawall@lip6.fr, rashmica.g@gmail.com
Subject: Re: [PATCH 2/2] powerpc/mm: Warn if W+X pages found on boot
Date: Fri, 9 Aug 2019 15:11:18 +0200 [thread overview]
Message-ID: <0bff3a15-254f-c04f-d5ac-2e1355064b7c@c-s.fr> (raw)
In-Reply-To: <6f3c93698669da36cb6bb354394a1f63c93a58cc.camel@russell.cc>
Le 02/05/2019 à 07:51, Russell Currey a écrit :
>>>>> + if (radix_enabled())
>>>>> + st.start_address = PAGE_OFFSET;
>>>>> + else
>>>> + st.start_address = KERN_VIRT_START;
>>>>
>>>> KERN_VIRT_START doesn't exist on PPC32.
>>>>
>>>> Christophe
>>>>
>>> Thanks a lot for the review! Applied all your suggestions. What
>>> should I use on PPC32 instead?
>>
>> Indeed it looks like KERN_VIRT_START is defined as 0 for PPC32 at
>> the
>> top of ptdump.c, which look strange to me.
>>
>> I guess PAGE_OFFSET should be the good value for KERN_VIRT_START on
>> PPC32.
>>
>> Christophe
>
> git blame says you put it there :) I'll set it to PAGE_OFFSET instead
> of zero. Cheers
>
Finally it seems that I was right at first place. KERN_VIRT_START should
be 0 because in walk_pagetables(), it starts with:
pgd_t *pgd = pgd_offset_k(0UL);
Now that KERN_VIRT_START has changed to 0xc0000000, I get a shift of
0xc0000000 in the display, ie the kernel pages are displayed starting at
0x80000000 instead of 0xc0000000 (0x80000000 = 0xc0000000 + 0xc0000000)
Since we only want to display kernel pages, I guess we should use
pgd_t *pgd = pgd_offset_k(KERN_VIRT_START); but then we can't use the
for () loop as it is.
Does it work properly on PPC64 ? If so, that's surprising.
Christophe
next prev parent reply other threads:[~2019-08-09 13:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 6:39 [PATCH 1/2] powerpc/mm/ptdump: Wrap seq_printf() to handle NULL pointers Russell Currey
2019-04-24 6:39 ` [PATCH 2/2] powerpc/mm: Warn if W+X pages found on boot Russell Currey
2019-04-24 7:14 ` Christophe Leroy
2019-05-01 7:04 ` Russell Currey
2019-05-02 5:23 ` Christophe Leroy
2019-05-02 5:51 ` Russell Currey
2019-08-09 13:11 ` Christophe Leroy [this message]
2019-04-24 6:56 ` [PATCH 1/2] powerpc/mm/ptdump: Wrap seq_printf() to handle NULL pointers Christophe Leroy
2019-04-24 7:00 ` Russell Currey
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=0bff3a15-254f-c04f-d5ac-2e1355064b7c@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=Julia.Lawall@lip6.fr \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=rashmica.g@gmail.com \
--cc=ruscur@russell.cc \
/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;
as well as URLs for NNTP newsgroup(s).