From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM: add support to dump the kernel page tables
Date: Thu, 24 Oct 2013 16:49:56 +0100 [thread overview]
Message-ID: <20131024154956.GN16735@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20131024125530.GA27357@linaro.org>
On Thu, Oct 24, 2013 at 01:55:31PM +0100, Steve Capper wrote:
> On Thu, Oct 24, 2013 at 01:23:06PM +0100, Russell King - ARM Linux wrote:
> > On Thu, Oct 24, 2013 at 11:51:44AM +0100, Steve Capper wrote:
> > > Hi Russell,
> > > I've given this a quick go on an Arndale with LPAE, and have a few
> > > suggestions below.
> >
> > Thanks.
> >
> > > > diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
> > > > index 5689c18..d7682cd 100644
> > > > --- a/arch/arm/include/asm/pgtable-3level.h
> > > > +++ b/arch/arm/include/asm/pgtable-3level.h
> > > > @@ -140,6 +140,7 @@
> > > > PMD_TYPE_TABLE)
> > > > #define pmd_sect(pmd) ((pmd_val(pmd) & PMD_TYPE_MASK) == \
> > > > PMD_TYPE_SECT)
> > > > +#define pmd_large(pmd) pmd_sect(pmd)
> > >
> > > Could we please instead do something like:
> > > #define pmd_large(pmd) (pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT))
> > >
> > > This matches the logic used in the huge pages patches (it picks up the
> > > PROT_NONE case) that would be missed above.
> >
> > Is this used in the generic parts of the kernel? Can you please point
> > out where?
> >
>
> Apologies I was a little vague. I don't think there are any PROT_NONE
> protected kernel huge pages, I am worried that pmd_huge may be used by
> other code (and then run into problems with PROT_NONE).
Well, the obvious question is: why would you want pmd_large() to return
false if there is a section entry in place?
next prev parent reply other threads:[~2013-10-24 15:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 7:16 ARM: add support to dump the kernel page tables Russell King - ARM Linux
2013-10-24 10:51 ` Steve Capper
2013-10-24 12:23 ` Russell King - ARM Linux
2013-10-24 12:55 ` Steve Capper
2013-10-24 15:49 ` Russell King - ARM Linux [this message]
2013-10-24 16:25 ` Steve Capper
2013-10-24 21:31 ` Russell King - ARM Linux
2013-10-31 17:28 ` Laura Abbott
2013-10-31 17:40 ` Russell King - ARM Linux
2013-11-26 13:50 ` Uwe Kleine-König
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=20131024154956.GN16735@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).