Request for review: [gcc] mark stack as non-executable

Omair Majid omajid at redhat.com
Fri Apr 29 11:02:38 PDT 2011


Hi,

The webrev marks libjvm.so's stack as non-executable:
http://cr.openjdk.java.net/~omajid/webrevs/libjvm-exec-stack/

The reason the stack was being marked as executable was because we were 
missing a .note.GNU-stack in the assembly files [1].

The patch is based on Diego's patch back in 2007 [2]. I have made a few 
changes to it. I have updated the paths to the .s files so it works with 
the newer hotspot. I have changed %progbits to @progbits, which is what 
is used in several places [3][4]. Gentoo documentation [1] indicates 
that sparc also supports non-executable stacks, so I have made the 
changes to the sparc files.

Any comments?

Thanks,
Omair

[1] http://www.gentoo.org/proj/en/hardened/gnu-stack.xml#doc_chap7
[2] http://mail.openjdk.java.net/pipermail/hotspot-dev/2007-May/000002.html
[3] 
http://sources.redhat.com/binutils/docs-2.12/as.info/Section.html#Section
[4] 
http://www.redhat.com/archives/fedora-devel-list/2003-November/msg00838.html


More information about the hotspot-dev mailing list