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: <20160811155926.GX3296@wotan.suse.de>
Date:	Thu, 11 Aug 2016 17:59:26 +0200
From:	"Luis R. Rodriguez" <mcgrof@...nel.org>
To:	Mark Salter <msalter@...hat.com>
Cc:	"Luis R. Rodriguez" <mcgrof@...nel.org>,
	linux-arch <linux-arch@...r.kernel.org>,
	Aurelien Jacquiot <a-jacquiot@...com>,
	Josh Poimboeuf <jpoimboe@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Guenter Roeck <linux@...ck-us.net>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: c6x linker issue on linux-next-20160808 + some linker table work

On Thu, Aug 11, 2016 at 07:32:42AM -0400, Mark Salter wrote:
> On Thu, 2016-08-11 at 07:56 +0200, Luis R. Rodriguez wrote:
> > On Wed, Aug 10, 2016 at 07:04:09PM -0400, Mark Salter wrote:
> > > 
> > > On Wed, 2016-08-10 at 23:30 +0200, Luis R. Rodriguez wrote:
> > > > OK thanks I've found a clean solution minimal solution to this as follows. This now
> > > > builds fine. Is this a fine work around for now ?
> > > Almost. You also need:
> > > 
> > > diff --git a/include/linux/tables.h b/include/linux/tables.h
> > > index a39ab03..3fa8d4d 100644
> > > --- a/include/linux/tables.h
> > > +++ b/include/linux/tables.h
> > > @@ -325,7 +325,7 @@
> > >               __attribute__((used,                                      \
> > >                              weak,                                      \
> > >                              __aligned__(LINUX_SECTION_ALIGNMENT(name)),\
> > > -                            section(SECTION_TBL(SECTION_RODATA,        \
> > > +                            section(SECTION_TBL(SECTION_TBL_RO,        \
> > >                                                  name, level))))
> > >  
> > >  /**
> > > 
> > > Otherwise, start and end RO table markers end up in different sections.
> > I thought that was not needed as weak attributes already force it to go to
> > .const ? Anyway I've added this as well. Thanks!
> 
> The section attribute forced both variables into .rodata but the weak
> attribute prevented accesses from using the SB-relative reloc. The
> non-weak variable is the one that led to the link error.

I ask as set_section_tbl_type() was not patched for instance, so firmware/Makefile
still uses SECTION_RODATA, and it compiles and links fine. Should that also be
using then SECTION_TBL_RO ? Or do we only need this for the C constructors ?

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ