lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140210104135.GD25305@arm.com>
Date:	Mon, 10 Feb 2014 10:41:36 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Kees Cook <keescook@...omium.org>
Cc:	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Russell King <linux@....linux.org.uk>,
	Will Deacon <Will.Deacon@....com>,
	Steven Capper <steve.capper@...aro.org>,
	Christoffer Dall <christoffer.dall@...aro.org>,
	Cyril Chemparathy <cyril@...com>,
	Marc Zyngier <Marc.Zyngier@....com>,
	Laura Abbott <lauraa@...eaurora.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ARM: mm: report both sections from PMD

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ