Roland Mainz wrote:
What about libraries on SPARC ? ARAIK the global data of libraries
should be non-executable by default like it is done on i386/AMD64 (the
lack of a public commit history in the OS/Net tree now hurts badly since
I can't figure out myself (or fetch the email of the person who did the
change and simply ask about the details via email) why global library
data were marked as non-executable for i386/AMD64 but not for SPARC
(32bit+64bit)).

Casper already pointed you to the comments in the mapfile explaining why
it can't be used on SPARC.

In X we at least mark the bss (and in turn the heap) no-exec on SPARC
when building programs, with a custom mapfile containing:

# Make bss section non-executable for further buffer overflow protection
# (can't make whole data section non-exec on SPARC since that includes PLT
#  which must be executable on SPARC).
bss = ?RW;

We combine that with the other mapfiles we use to link in our Makefiles:

All binaries: /usr/lib/ld/map.pagealign
x86 binaries: /usr/lib/ld/map.noexdata
All programs: /usr/lib/ld/map.bssalign /usr/lib/ld/map.noexstk

--
        -Alan Coopersmith-           [EMAIL PROTECTED]
         Sun Microsystems, Inc. - X Window System Engineering
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to