]> git.pld-linux.org Git - packages/glibc.git/commitdiff
- fix for mprotect enforced kernel
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 25 Mar 2011 18:16:09 +0000 (18:16 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    glibc-bug-12492.patch -> 1.1
    glibc.spec -> 1.898

glibc-bug-12492.patch [new file with mode: 0644]
glibc.spec

diff --git a/glibc-bug-12492.patch b/glibc-bug-12492.patch
new file mode 100644 (file)
index 0000000..2d0c129
--- /dev/null
@@ -0,0 +1,15 @@
+--- elf/dl-load.c      2011-01-26 22:02:02.000000000 +0100
++++ elf/dl-load.c      2011-01-26 22:30:22.000000000 +0100
+@@ -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);
+           }
index a9dacb3769cd83f461456a0611063c448f604627..a8e877351a9afc7f05e8131a2ebd62934d65ab64 100644 (file)
@@ -79,6 +79,7 @@ Patch30:      %{name}-static-glro-init.patch
 Patch31:       %{name}-origin.patch
 Patch32:       %{name}-Os-fail-workaround.patch
 Patch33:       %{name}-2.13-static-memmove-ssse3.patch
+Patch34:       %{name}-bug-12492.patch
 URL:           http://www.gnu.org/software/libc/
 %{?with_selinux:BuildRequires: audit-libs-devel}
 BuildRequires: autoconf
@@ -928,6 +929,7 @@ mv %{name}-ports-%{ports_version} ports
 %patch31 -p1
 %patch32 -p1
 %patch33 -p1
+%patch34 -p0
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
This page took 0.212944 seconds and 4 git commands to generate.