From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mm: report both sections from PMD
Date: Mon, 10 Feb 2014 10:41:36 +0000 [thread overview]
Message-ID: <20140210104135.GD25305@arm.com> (raw)
In-Reply-To: <20140210102935.GC25305@arm.com>
On Mon, Feb 10, 2014 at 10:29:35AM +0000, Catalin Marinas wrote:
> On Sun, Feb 09, 2014 at 10:18:26PM +0000, Kees Cook wrote:
> > diff --git a/arch/arm/mm/dump.c b/arch/arm/mm/dump.c
> > index 1f7b1e13d945..ff1559f9200c 100644
> > --- a/arch/arm/mm/dump.c
> > +++ b/arch/arm/mm/dump.c
> > @@ -264,6 +264,9 @@ static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start)
> > note_page(st, addr, 3, pmd_val(*pmd));
> > else
> > walk_pte(st, pmd, addr);
> > +
> > + if (SECTION_SIZE < PMD_SIZE && pmd_sect(*pmd))
> > + note_page(st, addr + SECTION_SIZE, 3, pmd_val(pmd[1]));
>
> You can use pmd_large() here as well.
>
> But I think this function is broken (the "for" statement not shown
> here). The pmd_t is 32-bit with classic MMU and it uses pmd++ while the
> address grows by PMD_SIZE (two pmd_t entries).
Actually it's ok since PTRS_PER_PMD is 1, so it only goes through this
loop once.
But in your patch shouldn't you check for pmd_large(*(pmd+1))? The first
pmd is already caught by the 'if' statement.
--
Catalin
next prev parent reply other threads:[~2014-02-10 10:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-09 22:18 [PATCH] ARM: mm: report both sections from PMD Kees Cook
2014-02-10 10:29 ` Catalin Marinas
2014-02-10 10:41 ` Catalin Marinas [this message]
2014-02-10 17:26 ` Kees Cook
2014-02-11 11:17 ` Catalin Marinas
2014-02-11 18:22 ` Kees Cook
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=20140210104135.GD25305@arm.com \
--to=catalin.marinas@arm.com \
--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).