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:	Mon, 20 May 2013 10:46:04 +0100
From:	Will Deacon <will.deacon@....com>
To:	David Daney <ddaney.cavm@...il.com>
Cc:	Catalin Marinas <Catalin.Marinas@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"david.daney@...ium.com" <david.daney@...ium.com>
Subject: Re: [PATCH] arm64: extable: sort the exception table at build time

Hi David,

On Fri, May 17, 2013 at 07:33:53PM +0100, David Daney wrote:
> On 05/17/2013 09:43 AM, Will Deacon wrote:
> > As is done for other architectures, sort the exception table at
> > build-time rather than during boot.
> >
> > Since sortextable appears to be a standalone C program relying on the
> > host elf.h to provide EM_AARCH64, I've had to add a conditional check in
> > order to allow cross-compilation on machines that aren't running a
> > bleeding-edge libc-dev.
> >
> > Signed-off-by: Will Deacon <will.deacon@....com>
> > ---
> >   arch/arm64/Kconfig              |  1 +
> >   arch/arm64/kernel/vmlinux.lds.S | 15 +++++++--------
> >   scripts/sortextable.c           |  5 +++++
> >   3 files changed, 13 insertions(+), 8 deletions(-)
> >
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index 48347dc..fb8fd90 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -7,6 +7,7 @@ config ARM64
> >   	select ARM_AMBA
> >   	select ARM_ARCH_TIMER
> >   	select ARM_GIC
> > +	select BUILDTIME_EXTABLE_SORT
> >   	select CLONE_BACKWARDS
> >   	select COMMON_CLK
> >   	select GENERIC_CLOCKEVENTS
> > diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
> > index 3fae2be..3d527726 100644
> > --- a/arch/arm64/kernel/vmlinux.lds.S
> > +++ b/arch/arm64/kernel/vmlinux.lds.S
> > @@ -57,6 +57,13 @@ SECTIONS
> >
> >   	RO_DATA(PAGE_SIZE)
> >
> > +	. = ALIGN(8);
> > +	__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
> > +		__start___ex_table = .;
> > +		*(__ex_table)
> > +		__stop___ex_table = .;
> > +	}
> > +
> >   	_etext = .;			/* End of text and rodata section */
> 
> 
> You have moved this to rodata.

I don't think I have moved this to rodata. The RO_DATA macro expands to a
bunch of sections, but it doesn't leave any of them open at the end.

> o Will the runtime sort still work like this?
> 
> o Do we care?  Maybe not.

For arm64 we'd be moving exclusively to build-time sorting, so I guess we
*could* stick the thing in rodata if we wanted to. Not sure it's worth the
linker script munging though.

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