Gentoo Archives: gentoo-hardened

From: pageexec@××××××××.hu
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] Re: Remove the pic use flag in the hardened amd64 profile.
Date: Tue, 01 Mar 2011 22:02:46
Message-Id: 4D6D5EF7.14594.295BA958@pageexec.freemail.hu
In Reply to: Re: [gentoo-hardened] Re: Remove the pic use flag in the hardened amd64 profile. by Daniel Reidy
1 On 28 Feb 2011 at 15:39, Daniel Reidy wrote:
2
3 > On Sun, Feb 27, 2011 at 5:58 PM, <pageexec@××××××××.hu> wrote:
4 > > that's actually not the intended use of the PIC USE flag, we wanted it originally
5 > > to enable configuring/compiling position independent code for packages where one
6 > > wanted to make a tradeoff between speed/security (i think php was one such app,
7 > > even without any hand written asm code).
8 > >
9 > > so with USE=pic you were supposed to get a textrel free, but potentially slower
10 > > binary (partly because of the PIC overhead on i386 and partly because sometimes
11 > > it meant using the C implementation of some algo instead of hand written asm).
12 >
13 > So if I understand this correctly, we should now be turning off PIC on
14 > Gentoo-Hardened systems running on AMD64. What about the non-hardened
15 > variety, such as my desktop, that is only running a "stock" version of
16 > Gentoo Sources without hardened features?
17
18 USE=pic should have exactly 0 effect on amd64 because the arch and the ELF ABI
19 makes PIC zero cost basically. if some package manages to get around the rules
20 somehow, it's a bug in that package, treat it accordingly ;).

Replies