r4530 - in glibc-package/branches/eglibc-2.13/debian: . patches/any
Author: aurel32
Date: 2011-02-26 10:40:31 +0000 (Sat, 26 Feb 2011)
New Revision: 4530
Added:
glibc-package/branches/eglibc-2.13/debian/patches/any/local-relro-mprotect.patch
Modified:
glibc-package/branches/eglibc-2.13/debian/changelog
Log:
* Add patches/any/local-relro-mprotect.patch to not crash with PaX
kernels. Closes: #611195.
Modified: glibc-package/branches/eglibc-2.13/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.13/debian/changelog 2011-02-24 06:54:11 UTC (rev 4529)
+++ glibc-package/branches/eglibc-2.13/debian/changelog 2011-02-26 10:40:31 UTC (rev 4530)
@@ -117,6 +117,8 @@
STT_GNU_IFUNC support.
* Add patches/any/submitted-ldsodefs_rtld_debug.diff to fix
EGLIBC_RTLD_DEBUG support on non NPTL systems.
+ * Add patches/any/local-relro-mprotect.patch to not crash with PaX
+ kernels. Closes: #611195.
[ Samuel Thibault ]
* Add patches/any/cvs-glro_dl_debug_mask.diff to fix build without
Added: glibc-package/branches/eglibc-2.13/debian/patches/any/local-relro-mprotect.patch
===================================================================
--- glibc-package/branches/eglibc-2.13/debian/patches/any/local-relro-mprotect.patch (rev 0)
+++ glibc-package/branches/eglibc-2.13/debian/patches/any/local-relro-mprotect.patch 2011-02-26 10:40:31 UTC (rev 4530)
@@ -0,0 +1,18 @@
+http://sources.redhat.com/bugzilla/show_bug.cgi?id=12492
+
+--- elf/dl-load.c
++++ elf/dl-load.c
+@@ -1398,7 +1398,11 @@
+ if (__builtin_expect (p + s <= relro_end, 1))
+ {
+ /* The variable lies in the region protected by RELRO. */
+- __mprotect ((void *) p, s, PROT_READ|PROT_WRITE);
++ if (__mprotect ((void *) p, s, PROT_READ|PROT_WRITE) < 0)
++ {
++ errstring = N_("cannot change memory protections");
++ goto call_lose_errno;
++ }
+ __stack_prot |= PROT_READ|PROT_WRITE|PROT_EXEC;
+ __mprotect ((void *) p, s, PROT_READ);
+ }
+
Reply to: