Re: [PROPOSAL/PATCH] Remove PT_GNU_STACK support before 2.6.11

From: Arjan van de Ven
Date: Sun Feb 06 2005 - 12:42:28 EST


On Sun, 2005-02-06 at 09:31 -0800, Linus Torvalds wrote:
>
> On Sun, 6 Feb 2005, Arjan van de Ven wrote:
> >
> > Note that these techniques all exist today. The only issue is that the
> > current code doesn't do the RWE->READIMPLIESEXEC binding, which my patch
> > fixed.
>
> My main objection to your patch is the naming. If 'executable_stack'
> affects the heap, then why is it called "executable_STACK"?

fair point.

>
> Wouldn't it be much nicer to
>
> - get rid of "EXSTACK_DEFAULT" as a special case, and instead just have
> the architecture _initialize_ the damn variable to what it wants? In
> other words, make it a nice understandable binary value (or maybe a
> bitmask, if you want to have separate flags for stack/heap/mmap),
> rather than a ternary value where one of the values means something
> arch-dependent.
>
> - just rename the dang thing to "read_implies_exec" and be done with it?
>
> Hmm? Wouldn't that make a lot more sense?

it would. It'll be a bit bigger than I'd be comfortable with this late
in the 2.6.11 cycle though.

>
> And if you want to split things up, there's at least three flags there:
> "stack" vs "file mapping" vs "anonymous mapping". For example, it might

lets add "brk" as 4th I guess.

Ok so what to do for 2.6.11... the setarch workaround is there; that
works. My patch patches the worst issues and is quite minimal. What you
propose will be more invasive and more suitable for 2.6.11-bk1...
I can do such a patch no problem (although the next two days I won't
have time).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/