From: steve.capper@linaro.org (Steve Capper)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V6 2/2] arm: mm: Modify pte_write and pmd_write logic for LPAE
Date: Thu, 3 Jul 2014 14:47:01 +0100 [thread overview]
Message-ID: <20140703134700.GA6720@linaro.org> (raw)
In-Reply-To: <20140703121808.GV32514@n2100.arm.linux.org.uk>
On Thu, Jul 03, 2014 at 01:18:08PM +0100, Russell King - ARM Linux wrote:
> On Thu, Jul 03, 2014 at 01:06:13PM +0100, Steve Capper wrote:
> > diff --git a/arch/arm/mm/dump.c b/arch/arm/mm/dump.c
> > index c508f41..00a1cf9 100644
> > --- a/arch/arm/mm/dump.c
> > +++ b/arch/arm/mm/dump.c
> > @@ -126,8 +126,8 @@ static const struct prot_bits section_bits[] = {
> > .val = PMD_SECT_USER,
> > .set = "USR",
> > }, {
> > - .mask = PMD_SECT_RDONLY,
> > - .val = PMD_SECT_RDONLY,
> > + .mask = PMD_SECT_AP2,
> > + .val = PMD_SECT_AP2,
>
> I think we're almost there, except for this hunk, which I think can
> just be deleted.
>
> We want to report what the PTEs/PMDs are requested to be, not what they
> physically are at the point where we dump them out. In other words, we
> don't want to know that they're physically read-only because the dirty
> bit isn't set - what we want to know is that they have permission to be
> written to if the dirty bit were to be set.
>
> The reasoning is that we want the dump to reflect what is possible -
> for example, we want to know whether a page can be executed _and_ written
> to.
>
> Consider the case where the dirty bit is implemented in hardware.
Thanks Russell, that makes more sense. I'll change the mask and val to:
L_PMD_SECT_RDONLY, to catch the software bit.
Cheers,
--
Steve
next prev parent reply other threads:[~2014-07-03 13:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 12:06 [PATCH V6 0/2] PTE fixes for ARM LPAE Steve Capper
2014-07-03 12:06 ` [PATCH V6 1/2] arm: mm: Introduce {pte, pmd}_isset and {pte, pmd}_isclear Steve Capper
2014-07-03 16:01 ` [PATCH V6 1/2] arm: mm: Introduce {pte,pmd}_isset and {pte,pmd}_isclear Will Deacon
2014-07-03 12:06 ` [PATCH V6 2/2] arm: mm: Modify pte_write and pmd_write logic for LPAE Steve Capper
2014-07-03 12:18 ` Russell King - ARM Linux
2014-07-03 13:47 ` Steve Capper [this message]
2014-07-03 15:44 ` [PATCH V7] " Steve Capper
2014-07-03 16:02 ` Will Deacon
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=20140703134700.GA6720@linaro.org \
--to=steve.capper@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).