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]
Date:	Wed, 09 Oct 2013 13:31:45 -0400
From:	Mark Salter <msalter@...hat.com>
To:	Will Deacon <will.deacon@....com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Catalin Marinas <Catalin.Marinas@....com>
Subject: Re: [PATCH] arm64: add PAGE_ALIGNED_DATA to linker script

On Wed, 2013-10-09 at 11:14 +0100, Will Deacon wrote:
> On Tue, Oct 08, 2013 at 09:37:39PM +0100, Mark Salter wrote:
> > The arm64 linker script doesn't use the PAGE_ALIGNED_DATA macro which
> > leads to a ".data..page_aligned" section being placed between the end
> > of .data and start of .bss:
> > 
> >  % readelf -e vmlinux
> >    ...
> >  Section to Segment mapping:
> >   Segment Sections...
> >    00     .head.text .text .text.init .rodata __ksymtab __ksymtab_gpl \
> >           __ksymtab_strings __param __modver __ex_table .notes \
> >           .init.text .init.data .data..percpu .data .data..page_aligned .bss
> > 
> > This causes problems for the EFI stub which may have to relocate the
> > kernel image based on stext and _edata symbols.
> > 
> > This patch adds PAGE_ALIGNED_DATA() to the linker script inside the
> > the .data section.
> > 
> > Signed-off-by: Mark Salter <msalter@...hat.com>
> > ---
> >  arch/arm64/kernel/vmlinux.lds.S | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
> > index f8ab9d8..e441556 100644
> > --- a/arch/arm64/kernel/vmlinux.lds.S
> > +++ b/arch/arm64/kernel/vmlinux.lds.S
> > @@ -110,6 +110,7 @@ SECTIONS
> >  		 */
> >  		INIT_TASK_DATA(THREAD_SIZE)
> >  		NOSAVE_DATA
> > +		PAGE_ALIGNED_DATA(PAGE_SIZE)
> >  		CACHELINE_ALIGNED_DATA(64)
> >  		READ_MOSTLY_DATA(64)
> 
> Can we just replace this chunk with RW_DATA_SECTION(64, PAGE_SIZE,
> THREAD_SIZE) instead?

Possibly. The layout of the included macros is the same. The only
difference being the placement of _data, _sdata, and _edata inside
.data and the use of __data_loc.

--Mark


--
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