1 --- glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c.orig 2003-12-05 01:26:05.000000000 +0100
2 +++ glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c 2004-03-18 16:09:49.200234840 +0100
4 PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) == 0)
6 # if __ASSUME_PROT_GROWSUPDOWN == 0
8 + if (errno == EINVAL) {
13 + if (errno == EACCES) /* PAX is enabled */
17 +# if __ASSUME_PROT_GROWSUPDOWN == 0
28 - if (errno != ENOMEM) /* Unexpected failure mode. */
29 + if (errno == EACCES) { /* PAX is enabled */
31 + } else if (errno != ENOMEM) { /* Unexpected failure mode. */
35 if (size == GL(dl_pagesize))
36 /* We just tried to mprotect the top hole page and failed.
38 PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSUP) == 0)
40 # if __ASSUME_PROT_GROWSUPDOWN == 0
41 - if (errno == EINVAL)
42 + if (errno == EINVAL) {
47 + if (errno == EACCES) /* PAX is enabled */
51 +# if __ASSUME_PROT_GROWSUPDOWN == 0
62 - if (errno != ENOMEM) /* Unexpected failure mode. */
63 + if (errno == EACCES) { /* PAX is enabled */
65 + } else if (errno != ENOMEM) { /* Unexpected failure mode. */
69 if (size == GL(dl_pagesize))
70 /* We just tried to mprotect the lowest hole page and failed.