GNU C Library master sources branch, ibm/2.11/master, updated. glibc-2.11.1-76-g91ab06c

rsa@sourceware.org rsa@sourceware.org
Fri Jun 11 20:37:00 GMT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, ibm/2.11/master has been updated
       via  91ab06c7447d8e123b6670bc8e595c15c9ed991f (commit)
      from  165ab209dffe764f7aea8d6b732f84cf5c0bb02c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91ab06c7447d8e123b6670bc8e595c15c9ed991f

commit 91ab06c7447d8e123b6670bc8e595c15c9ed991f
Author: Ryan Arnold <ryanarn@etna.rchland.ibm.com>
Date:   Fri Jun 11 15:11:10 2010 -0500

    Experimental patch to default PPC64 to no-execstack support.  This will need
    to be abstracted to remove the guards from common files and put the stack
    initialization into a header file that can be overridden.
    
    2010-06-11  Ryan S. Arnold  <rsa@us.ibm.com>
    
    	* elf/dl-load.c (_dl_map_object_from_fd): Set default stack_flags to
    	no-exec for ARCH_PPC64.
    	* elf/dl-support.c [_dl_stack_flags]: Set default stack_flags to
    	no-exec for ARCH_PPC64.
    	* elf/rtld.c (_dl_starting_up): Set default stack_flags to no-exec for
    	ARCH_PPC64.

diff --git a/ChangeLog b/ChangeLog
index 01b1ef6..0e4cdfb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-06-11  Ryan S. Arnold  <rsa@us.ibm.com>
+
+	* elf/dl-load.c (_dl_map_object_from_fd): Set default stack_flags to
+	no-exec for ARCH_PPC64.
+	* elf/dl-support.c [_dl_stack_flags]: Set default stack_flags to
+	no-exec for ARCH_PPC64.
+	* elf/rtld.c (_dl_starting_up): Set default stack_flags to no-exec for
+	ARCH_PPC64.
+
 2010-05-28  Luis Machado  <luisgpm@br.ibm.com>
 
 	* sysdeps/powerpc/powerpc32/power7/memcpy.S: Exchange srdi for srwi.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 597193c..ff02fe4 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -996,8 +996,13 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
 	}
     }
 
+#if (defined (_ARCH_PPC64) || defined (__powerpc64__))
+  /* Default to no-exec stack on PPC64.  */
+  uint_fast16_t stack_flags = PF_R|PF_W;
+#else
   /* Presumed absent PT_GNU_STACK.  */
   uint_fast16_t stack_flags = PF_R|PF_W|PF_X;
+#endif
 
   {
     /* Scan the program header table, collecting its load commands.  */
diff --git a/elf/dl-support.c b/elf/dl-support.c
index bcf0e2a..8d2d616 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -126,8 +126,15 @@ ElfW(Phdr) *_dl_phdr;
 size_t _dl_phnum;
 uint64_t _dl_hwcap __attribute__ ((nocommon));
 
+
+#if (defined (_ARCH_PPC64) || defined (__powerpc64__))
+/* Default to no-exec stack on PPC64.  */
+/* Prevailing state of the stack, PF_X indicating it's executable.  */
+ElfW(Word) _dl_stack_flags = PF_R|PF_W;
+#else
 /* Prevailing state of the stack, PF_X indicating it's executable.  */
 ElfW(Word) _dl_stack_flags = PF_R|PF_W|PF_X;
+#endif
 
 /* If loading a shared object requires that we make the stack executable
    when it was not, we do it by calling this function.
diff --git a/elf/rtld.c b/elf/rtld.c
index 55b84c3..bcaaf90 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -123,7 +123,12 @@ INTVARDEF(_dl_starting_up)
 struct rtld_global _rtld_global =
   {
     /* Default presumption without further information is executable stack.  */
+#if (defined (_ARCH_PPC64) || defined (__powerpc64__))
+    /* Default to no-exec stack on PPC64.  */
+    ._dl_stack_flags = PF_R|PF_W,
+#else
     ._dl_stack_flags = PF_R|PF_W|PF_X,
+#endif
 #ifdef _LIBC_REENTRANT
     ._dl_load_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER,
 #endif

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    9 +++++++++
 elf/dl-load.c    |    5 +++++
 elf/dl-support.c |    7 +++++++
 elf/rtld.c       |    5 +++++
 4 files changed, 26 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources



More information about the Glibc-cvs mailing list