]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 25 Sep 2003 03:31:59 +0000 (03:31 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 25 Sep 2003 03:31:59 +0000 (03:31 +0000)
* sysdeps/unix/sysv/linux/dl-execstack.c
(_dl_make_stack_executable): Remember that we changed the permission.

ChangeLog
nptl/ChangeLog
nptl/allocatestack.c
sysdeps/unix/sysv/linux/dl-execstack.c

index 98435be439e4e67b2a611cb5c9132c734031b96d..2b0b36f10fec8e830c66473ba0aab7ba01082062 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/unix/sysv/linux/dl-execstack.c
+       (_dl_make_stack_executable): Remember that we changed the permission.
+
        * sysdeps/ia64/dl-machine.h (RTLD_START): Remove setting of
        __libc_stack_end.  Patch by David Mosberger.
 
index e18c9cac21b1de9666ccd511508c358dc02886a3..30b7d9eb1db81ec5cbeb64dc15f16f230070656d 100644 (file)
@@ -1,5 +1,8 @@
 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
 
+       * allocatestack.c (__make_stacks_executable): Also change
+       permission of the currently unused stacks.
+
        * allocatestack.c (change_stack_perm): Split out from
        __make_stacks_executable.
        (allocate_stack): If the required permission changed between the time
index 24292e729503ed24ddc46995f7e40d744d417bbe..c82b36ede0afc41d676ead38c3497562ca66ec9b 100644 (file)
@@ -684,6 +684,20 @@ __make_stacks_executable (void)
        break;
     }
 
+  /* Also change the permission for the currently unused stacks.  This
+     might be wasted time but better spend it here than adding a check
+     in the fast path.  */
+  list_for_each (runp, &stack_cache)
+    {
+      err = change_stack_perm (list_entry (runp, struct pthread, list)
+#ifdef NEED_SEPARATE_REGISTER_STACK
+                              , pagemask
+#endif
+                              );
+      if (err != 0)
+       break;
+    }
+
   lll_unlock (stack_cache_lock);
 
   if (err == 0)
index 42300b0f4d9df39d008f3a446dcd5de6f8343717..c840f610318f96f8f0c46e16f039fc1bf3bb0326 100644 (file)
@@ -110,6 +110,9 @@ _dl_make_stack_executable (void)
 # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
 #endif
 
+  /* Remember that we changed the permission.  */
+  GL(dl_stack_flags) |= PF_X;
+
   return 0;
 }
 rtld_hidden_def (_dl_make_stack_executable)