GNU_STACK ELF header
David Holmes
David.Holmes at oracle.com
Sun Aug 29 04:39:38 PDT 2010
David Holmes said the following on 08/29/10 09:03:
> Douglas Simon said the following on 08/28/10 23:42:
>> I think the long term solution is to modify the
>> __make_stacks_executable function in libc/nptl/allocatestack.c such
>> that it only adds the PROT_EXEC bit to each thread's stack and leaves
>> the current values for the PROT_READ and PROT_WRITE bits as is.
>
> I find it hard to believe that they would overwrite the permission bits
> rather than augment them in the first place. I can't wait to find out
> what justification they think they had for doing that. :(
<sigh> Looks like it is because the OS gives no way to do otherwise :(
mprotect doesn't allow you to add to the existing permissions only set
them - and there's no API that I can see to query page permissions.
There's some interesting discussion in this LK thread:
http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-02/0145.html
David
More information about the hotspot-dev
mailing list