1 |
On Wed, Dec 14, 2005 at 08:51:42AM +0100, Kevin F. Quinn wrote: |
2 |
> On Wed, 14 Dec 2005 07:59:23 +0100 |
3 |
> Harald van Dijk <truedfx@g.o> wrote: |
4 |
> |
5 |
> > On Wed, Dec 14, 2005 at 03:50:16AM +0000, Mike Frysinger wrote: |
6 |
> > > my gnu stack docs are actually complete: |
7 |
> > > http://hardened.gentoo.org/gnu-stack.xml |
8 |
> > |
9 |
> > A question about that: you discourage fixing this with --noexecstack |
10 |
> > because it's better to be able to submit a patch upstream. What's your |
11 |
> > take on patches that modify configure scripts or similar files to |
12 |
> > check for this flag, keeping it out of the ebuild? Is that good, |
13 |
> > acceptable, or bad, and why? |
14 |
> |
15 |
> Using '--noexecstack' overrides anything the compiler works out for |
16 |
> itself, so applying it indiscriminately is a bad idea. For example, if |
17 |
> an application contains asm code with no markings, but also contains |
18 |
> code that creates trampolines, it should be marked for executable stack |
19 |
> even if the asm code is fixed. Applying '--noexecstack' via LDFLAGS |
20 |
> would break such an application. |
21 |
> |
22 |
> Regarding patches, it's usually much simpler to patch asm source code |
23 |
> compared to patching an application's make process. Patching asm |
24 |
> source code just means appending a few lines depending on the type of |
25 |
> assembler used. |
26 |
> |
27 |
> As far as ebuilds are concerned, if you add it to LDFLAGS you will need |
28 |
> to re-check the application every time you bump the ebuild, and it's |
29 |
> difficult to find new occurrences of nested functions for example if |
30 |
> you've applied '--noexecstack'. |
31 |
|
32 |
LDFLAGS? Assuming you meant ASFLAGS, this doesn't affect C files, and |
33 |
would need rechecking of the assembly code on updates just as much as |
34 |
patches which add .note.GNU-stack would, right? |