changeset 2647:b1d858e368bb

PR2523: Add executable stack markings to callNative.S on JamVM 2015-07-13 Andrew John Hughes <gnu_andrew@member.fsf.org> 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.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Fri, 01 Apr 2016 00:54:40 +0100
parents e67ce0e50658
children 0637ff9bfd77
files ChangeLog Makefile.am NEWS patches/jamvm/noexecstack.patch
diffstat 4 files changed, 62 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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  <gnu_andrew@member.fsf.org>
+
+	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  <gnu_andrew@member.fsf.org>
 
 	PR2392: Make elliptic curve removal
--- 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
--- 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
--- /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