[OE-core] [PATCH] insane: detect and warn about relocations in .text

Richard Purdie richard.purdie at linuxfoundation.org
Wed Oct 3 11:19:22 UTC 2012


On Wed, 2012-10-03 at 11:44 +0100, Phil Blundell wrote:
> On Wed, 2012-10-03 at 12:31 +0200, Martin Jansa wrote:
> > On Wed, Oct 03, 2012 at 11:24:12AM +0100, Phil Blundell wrote:
> > > Signed-off-by: Phil Blundell <pb at pbcl.net>
> > 
> > Can you add a bit longer description of possible issues with relocations
> > in .text? So that people seeing this issue will know how dangerous it is
> > for them?
> > 
> > From my understanding (after reading
> > http://www.gentoo.org/proj/en/hardened/pic-fix-guide.xml) it's mostly
> > performance issue?
> 
> Yes, that's correct.  It basically falls into the same sort of category
> as useless-rpaths; the binary will still work, but there will be some
> adverse impact on performance and memory usage.  
> 
> Historically, the most common cause of DT_TEXTREL was accidentally
> linking non-PIC code into a DSO.  Recent versions of the linker will
> flatly refuse to do this on at least some architectures, though, so
> hopefully this problem will just go away over time.

Am I right in thinking this is also a marginal help to 'security' since
if the .text segment is loaded read only, it becomes slightly harder for
certain kinds of overflow attacks to work?

Cheers,

Richard





More information about the Openembedded-core mailing list