SOURCES: glibc-pax_dl-execstack.patch - updated for 2.3.5

kosmo kosmo at pld-linux.org
Tue Aug 30 10:09:06 CEST 2005


Author: kosmo                        Date: Tue Aug 30 08:09:05 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated for 2.3.5

---- Files affected:
SOURCES:
   glibc-pax_dl-execstack.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/glibc-pax_dl-execstack.patch
diff -u SOURCES/glibc-pax_dl-execstack.patch:1.1 SOURCES/glibc-pax_dl-execstack.patch:1.2
--- SOURCES/glibc-pax_dl-execstack.patch:1.1	Thu Mar 18 16:40:28 2004
+++ SOURCES/glibc-pax_dl-execstack.patch	Tue Aug 30 10:09:00 2005
@@ -1,12 +1,15 @@
---- glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c.orig	2003-12-05 01:26:05.000000000 +0100
-+++ glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c	2004-03-18 16:09:49.200234840 +0100
-@@ -47,11 +47,17 @@
- 		      PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) == 0)
+Patch by: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
+
+diff -Nru glibc-2.3.3.old/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c
+--- glibc-2.3.3.old/sysdeps/unix/sysv/linux/dl-execstack.c	2004-09-24 01:40:02.663710000 -0400
++++ glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c	2004-09-24 01:54:55.883919888 -0400
+@@ -56,11 +56,17 @@
+ 					__stack_prot) == 0, 1))
  	goto return_success;
- #  if __ASSUME_PROT_GROWSUPDOWN == 0
+ # if __ASSUME_PROT_GROWSUPDOWN == 0
 -      if (errno == EINVAL)
 +      if (errno == EINVAL) {
- 	no_growsdown = true;
+ 	no_growsupdown = true;
 -      else
 +      } else {
 +#  endif
@@ -16,12 +19,12 @@
 +	  return errno;
 +#  if __ASSUME_PROT_GROWSUPDOWN == 0
 +      }
- #  endif
+ # endif
 -	return errno;
      }
- # endif
+ #endif
  
-@@ -73,8 +79,11 @@
+@@ -84,8 +90,11 @@
  	page -= size;
        else
  	{
@@ -32,30 +35,9 @@
  	    return errno;
 +	  }
  
- 	  if (size == GL(dl_pagesize))
+ 	  if (size == GLRO(dl_pagesize))
  	    /* We just tried to mprotect the top hole page and failed.
-@@ -105,11 +114,17 @@
- 		      PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSUP) == 0)
- 	goto return_success;
- #  if __ASSUME_PROT_GROWSUPDOWN == 0
--      if (errno == EINVAL)
-+      if (errno == EINVAL) {
- 	no_growsup = true;
--      else
-+      } else {
-+#  endif
-+	if (errno == EACCES)		/* PAX is enabled */
-+	  return 0;
-+	else
-+	  return errno;
-+#  if __ASSUME_PROT_GROWSUPDOWN == 0
-+      }
- #  endif
--	return errno;
-     }
- # endif
- 
-@@ -130,8 +145,11 @@
+@@ -107,8 +116,11 @@
  	page += size;
        else
  	{
@@ -66,5 +48,5 @@
  	    return errno;
 +	  }
  
- 	  if (size == GL(dl_pagesize))
+ 	  if (size == GLRO(dl_pagesize))
  	    /* We just tried to mprotect the lowest hole page and failed.
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/glibc-pax_dl-execstack.patch?r1=1.1&r2=1.2&f=u




More information about the pld-cvs-commit mailing list