From: Derrick Brashear Date: Thu, 12 Nov 2009 00:36:01 +0000 (-0500) Subject: asm unexecutable stack X-Git-Tag: openafs-stable-1_4_12pre1~79 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4b5e7ebf303621973fb0338cb1e2481e2c140065;p=packages%2Fo%2Fopenafs.git asm unexecutable stack make stack not executable in assembled files FIXES 125491 Change-Id: I396680b6877843201f6c07d5607385044abd5e74 Reviewed-on: http://gerrit.openafs.org/818 Reviewed-by: Simon Wilkinson Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9bfd03d723a9cf17673f40513a7adde1d503bcbc) Reviewed-on: http://gerrit.openafs.org/976 --- diff --git a/src/lwp/process.amd64.s b/src/lwp/process.amd64.s index 4b1ef9643..1d59cd4dd 100644 --- a/src/lwp/process.amd64.s +++ b/src/lwp/process.amd64.s @@ -47,6 +47,10 @@ #include +#if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits +#endif + .file "process.s" .data .text diff --git a/src/lwp/process.i386.s b/src/lwp/process.i386.s index 9e7ddb3a0..f5b3bc416 100644 --- a/src/lwp/process.i386.s +++ b/src/lwp/process.i386.s @@ -17,6 +17,9 @@ */ #include +#if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits +#endif .file "process.s" diff --git a/src/lwp/process.s b/src/lwp/process.s index ed3c173e0..7538c5303 100644 --- a/src/lwp/process.s +++ b/src/lwp/process.s @@ -12,6 +12,10 @@ #include /*#endif /* AFS_DJGPP_ENV */ +#if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits +#endif + #if defined(__arm32__) || defined(__arm__) /* register definitions */ fp .req r11 diff --git a/src/lwp/process.s390.s b/src/lwp/process.s390.s index 660ec1f4a..585404fdd 100644 --- a/src/lwp/process.s390.s +++ b/src/lwp/process.s390.s @@ -16,7 +16,11 @@ #define IGNORE_STDS_H 1 #include - .file "process.s" +#if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits +#endif + + .file "process.s" .globl savecontext .type savecontext,%function diff --git a/src/lwp/process.s390x.s b/src/lwp/process.s390x.s index e36b7cab0..f3087bfcf 100644 --- a/src/lwp/process.s390x.s +++ b/src/lwp/process.s390x.s @@ -17,7 +17,11 @@ #define IGNORE_STDS_H 1 #include - .file "process.s" +#if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits +#endif + + .file "process.s" .globl savecontext .type savecontext,%function diff --git a/src/sys/syscall.s b/src/sys/syscall.s index 233117fa1..c42d5780f 100644 --- a/src/sys/syscall.s +++ b/src/sys/syscall.s @@ -10,6 +10,10 @@ #define IGNORE_STDS_H #include +#if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits +#endif + #if defined(AFS_AIX32_ENV) && defined(RIOS) /* * This is never be referenced, and is only here as placeholder;