GNU_STACK ELF header

Dr Andrew John Hughes ahughes at redhat.com
Fri Aug 27 13:40:08 PDT 2010


On 27 August 2010 21:17, Douglas Simon <doug.simon at oracle.com> wrote:
>
> On Aug 27, 2010, at 7:49 PM, Dr Andrew John Hughes wrote:
>
>> On 27 August 2010 16:31, Kelly O'Hair <kelly.ohair at oracle.com> wrote:
>>> Interesting. Had not heard about this new Elf header.
>>>
>>> The Linux systems and gcc compilers used for jdk5 and jdk6 builds is pretty
>>> old.
>>>
>>> 32bit:
>>> gcc (GCC) 3.2.1-7a (J2SE release)
>>>
>>> 64bit:
>>> gcc (GCC) 3.2.2 (SuSE Linux)
>>>
>>> For jdk7, we are using the gcc compiler provided with Fedora 9,  gcc 4.3.0
>>>
>>> -kto
>>>
>>>
>>> On Aug 26, 2010, at 11:25 PM, Douglas Simon wrote:
>>>
>>>> As a result of stack overflow detection breaking in Maxine on Linux, I
>>>> learnt about this ELF header. My experience is described here:
>>>> http://blogs.sun.com/dns/entry/stacks_with_split_personalities
>>>>
>>>> Is this issue known in HotSpot/JDK? If so, how exactly is the header being
>>>> omitted from the HotSpot and JDK libraries and executables?
>>>>
>>>> -Doug
>>>
>>>
>>
>> This was discussed last year:
>> http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2009-August/006995.html
>> and is patched in IcedTea6 by icedtea-gcc-stack-markings.patch.
>>
>> GCC 4.3 is the earliest version of GCC IcedTea has been built with, to
>> my knowledge, rather than the latest.  I'm currently building with GCC
>> 4.5.1.
>
>
> If I understand the patch correctly, it still leaves an IcedTea process in the position where all stacks are made executable if an 'executable-stack' native library is loaded. As far as I can tell, there's no way to really avoid this given the behaviour of the dynamic linker on Linux. Or am I missing something?
>
> -Doug
>
>

I'm afraid I don't know the details, only that this patch means the VM
no longer has executable stack.
-- 
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8


More information about the hotspot-dev mailing list