# HG changeset patch # User Andrew John Hughes # Date 1459468480 -3600 # Node ID b1d858e368bbb69fddeab23e848b803db0b6e8e6 # Parent e67ce0e5065829366d79b1e5c06a0c98534f8d31 PR2523: Add executable stack markings to callNative.S on JamVM 2015-07-13 Andrew John Hughes PR2523: Add executable stack markings to callNative.S on JamVM * Makefile.am: (ICEDTEA_PATCHES): Add patch. * NEWS: Updated. * patches/jamvm/noexecstack.patch: Add notes to assembly files in order to turn off executable stack. diff -r e67ce0e50658 -r b1d858e368bb ChangeLog --- a/ChangeLog Thu Mar 31 22:14:43 2016 +0100 +++ b/ChangeLog Fri Apr 01 00:54:40 2016 +0100 @@ -1,3 +1,14 @@ +2015-07-13 Andrew John Hughes + + PR2523: Add executable stack markings + to callNative.S on JamVM + * Makefile.am: + (ICEDTEA_PATCHES): Add patch. + * NEWS: Updated. + * patches/jamvm/noexecstack.patch: + Add notes to assembly files in order to + turn off executable stack. + 2015-07-13 Andrew John Hughes PR2392: Make elliptic curve removal diff -r e67ce0e50658 -r b1d858e368bb Makefile.am --- a/Makefile.am Thu Mar 31 22:14:43 2016 +0100 +++ b/Makefile.am Fri Apr 01 00:54:40 2016 +0100 @@ -309,7 +309,8 @@ if BUILD_JAMVM ICEDTEA_PATCHES += \ patches/jamvm/find_class_from_caller.patch \ - patches/jamvm/pr2034-tempdir.patch + patches/jamvm/pr2034-tempdir.patch \ + patches/jamvm/noexecstack.patch endif if !ENABLE_SUNEC diff -r e67ce0e50658 -r b1d858e368bb NEWS --- a/NEWS Thu Mar 31 22:14:43 2016 +0100 +++ b/NEWS Fri Apr 01 00:54:40 2016 +0100 @@ -187,6 +187,7 @@ - GC: Minor performance improvement - PR2034: --enable-jamvm builds broken, missing JVM_GetTemporaryDirectory impl - PR2336: JamVM lacks JVM_FindClassFromCaller + - PR2523: Add executable stack markings to callNative.S on JamVM * CACAO - PR1277: Synchronise CACAO rules between IcedTea6/7/8 where possible - PR1279: Synchronise CACAO versions between IcedTea6/7/8 where possible diff -r e67ce0e50658 -r b1d858e368bb patches/jamvm/noexecstack.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/jamvm/noexecstack.patch Fri Apr 01 00:54:40 2016 +0100 @@ -0,0 +1,48 @@ +diff --git a/src/os/linux/arm/callNative.S jamvm/jamvm/src/os/linux/arm/callNative.S +index 245afd1..1583023 100644 +--- jamvm.orig/jamvm/src/os/linux/arm/callNative.S ++++ jamvm/jamvm/src/os/linux/arm/callNative.S +@@ -36,3 +36,7 @@ + #include "callNativeOABI.S" + #endif + #endif ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif +diff --git jamvm.orig/jamvm/src/os/linux/mips/callNative.S jamvm/jamvm/src/os/linux/mips/callNative.S +index cede343..90d9163 100644 +--- jamvm.orig/jamvm/src/os/linux/mips/callNative.S ++++ jamvm/jamvm/src/os/linux/mips/callNative.S +@@ -184,3 +184,7 @@ return: + j $31 + .end callJNIMethod + #endif ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif +diff --git jamvm.orig/jamvm/src/os/linux/powerpc/callNative.S jamvm/jamvm/src/os/linux/powerpc/callNative.S +index aa47f6a..763dc0a 100644 +--- jamvm.orig/jamvm/src/os/linux/powerpc/callNative.S ++++ jamvm/jamvm/src/os/linux/powerpc/callNative.S +@@ -281,3 +281,7 @@ return: + mr 1,11 + blr + #endif ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif +diff --git jamvm.orig/jamvm/src/os/linux/x86_64/callNative.S jamvm/jamvm/src/os/linux/x86_64/callNative.S +index 26404e6..9fb5cdf 100644 +--- jamvm.orig/jamvm/src/os/linux/x86_64/callNative.S ++++ jamvm/jamvm/src/os/linux/x86_64/callNative.S +@@ -267,3 +267,7 @@ float_ret: + addq $8, %rcx + jmp return + #endif ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif