diff -urN glibc-2.3.5.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.3.5/sysdeps/unix/sysv/linux/dl-execstack.c --- glibc-2.3.5.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2005-09-23 13:07:35.000000000 +0200 +++ glibc-2.3.5/sysdeps/unix/sysv/linux/dl-execstack.c 2005-09-23 13:31:45.000000000 +0200 @@ -60,7 +60,10 @@ no_growsupdown = true; else # endif - return errno; + if (errno == EACCES) /* PaX */ + return 0; + else + return errno; } #endif @@ -86,7 +89,10 @@ { /* Unexpected failure mode. */ if (errno != ENOMEM && errno != EFAULT) - return errno; + if (errno == EACCES) /* PaX */ + return 0; + else + return errno; if (size == GLRO(dl_pagesize)) /* We just tried to mprotect the top hole page and failed. @@ -110,7 +116,10 @@ { /* Unexpected failure mode. */ if (errno != ENOMEM && errno != EFAULT) - return errno; + if (errno == EACCES) /* PaX */ + return 0; + else + return errno; if (size == GLRO(dl_pagesize)) /* We just tried to mprotect the lowest hole page and failed.