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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1302031335590.6300@xanadu.home>
Date:	Sun, 3 Feb 2013 13:36:42 -0500 (EST)
From:	Nicolas Pitre <nicolas.pitre@...aro.org>
To:	Ben Hutchings <ben@...adent.org.uk>
cc:	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Tomasz Figa <t.figa@...sung.com>,
	Russell King <rmk+kernel@....linux.org.uk>
Subject: Re: [ 058/128] ARM: 7628/1: head.S: map one extra section for the
 ATAG/DTB area

On Sun, 3 Feb 2013, Ben Hutchings wrote:

> On Sun, 2013-02-03 at 15:47 +0100, Ben Hutchings wrote:
> > 3.2-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Nicolas Pitre <nicolas.pitre@...aro.org>
> > 
> > commit 6f16f4998f98e42e3f2dedf663cfb691ff0324af upstream.
> > 
> > We currently use a temporary 1MB section aligned to a 1MB boundary for
> > mapping the provided device tree until the final page table is created.
> > However, if the device tree happens to cross that 1MB boundary, the end
> > of it remains unmapped and the kernel crashes when it attempts to access
> > it.  Given no restriction on the location of that DTB, it could end up
> > with only a few bytes mapped at the end of a section.
> > 
> > Solve this issue by mapping two consecutive sections.
> > 
> > Signed-off-by: Nicolas Pitre <nico@...aro.org>
> > Tested-by: Sascha Hauer <s.hauer@...gutronix.de>
> > Tested-by: Tomasz Figa <t.figa@...sung.com>
> > Signed-off-by: Russell King <rmk+kernel@....linux.org.uk>
> > [bwh: Backported to 3.2:
> >  - Adjust context
> >  - The mapping is not conditional; drop the 'ne' suffixes]
> > Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
> 
> I haven't been able to test this and would really appreciate an expert
> review.

Looks fine to me.


> 
> Ben.
> 
> > ---
> >  arch/arm/kernel/head.S |    3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > --- a/arch/arm/kernel/head.S
> > +++ b/arch/arm/kernel/head.S
> > @@ -221,6 +221,7 @@ __create_page_tables:
> >  	/*
> >  	 * Then map boot params address in r2 or
> >  	 * the first 1MB of ram if boot params address is not specified.
> > +	 * We map 2 sections in case the ATAGs/DTB crosses a section boundary.
> >  	 */
> >  	mov	r0, r2, lsr #SECTION_SHIFT
> >  	movs	r0, r0, lsl #SECTION_SHIFT
> > @@ -229,6 +230,8 @@ __create_page_tables:
> >  	add	r3, r3, #PAGE_OFFSET
> >  	add	r3, r4, r3, lsr #(SECTION_SHIFT - PMD_ORDER)
> >  	orr	r6, r7, r0
> > +	str	r6, [r3], #1 << PMD_ORDER
> > +	add	r6, r6, #1 << SECTION_SHIFT
> >  	str	r6, [r3]
> >  
> >  #ifdef CONFIG_DEBUG_LL
> > 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe stable" in
> > the body of a message to majordomo@...r.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 
> -- 
> Ben Hutchings
> Everything should be made as simple as possible, but not simpler.
>                                                            - Albert Einstein
> 
--
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