This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch sid
in repository glibc.

commit 5d92864b194e42e7480ddafcb8329f9d64e08e05
Author: Samuel Thibault <samuel.thiba...@ens-lyon.org>
Date:   Mon Apr 4 10:15:55 2016 +0200

    hurd: fix inheritence of shared anonymous memory
    
    hurd-i386/submitted-anon-mmap-shared.diff
---
 debian/changelog                                   |  2 ++
 .../hurd-i386/submitted-anon-mmap-shared.diff      | 36 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 39 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 3d6971b..04359d9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ glibc (2.22-6) UNRELEASED; urgency=medium
 
   [ Samuel Thibault ]
   * hurd-i386/submitted-auxv.diff: New patch, fixes cvs crash.
+  * hurd-i386/submitted-anon-mmap-shared.diff: New patch, fixes inheritence of
+  shared anonymous memory.
 
  -- Aurelien Jarno <aure...@debian.org>  Tue, 29 Mar 2016 00:50:55 +0200
 
diff --git a/debian/patches/hurd-i386/submitted-anon-mmap-shared.diff 
b/debian/patches/hurd-i386/submitted-anon-mmap-shared.diff
new file mode 100644
index 0000000..5903cda
--- /dev/null
+++ b/debian/patches/hurd-i386/submitted-anon-mmap-shared.diff
@@ -0,0 +1,36 @@
+Optimizing anonymous maps brings bugs, and does not optimize much anyway.
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=19903
+
+--- a/sysdeps/mach/hurd/mmap.c
++++ b/sysdeps/mach/hurd/mmap.c
+@@ -44,29 +44,6 @@ __mmap (__ptr_t addr, size_t len, int pr
+   if ((mapaddr & (vm_page_size - 1)) || (offset & (vm_page_size - 1)))
+     return (__ptr_t) (long int) __hurd_fail (EINVAL);
+ 
+-  if ((flags & (MAP_TYPE|MAP_INHERIT)) == MAP_ANON
+-      && prot == (PROT_READ|PROT_WRITE)) /* cf VM_PROT_DEFAULT */
+-    {
+-      /* vm_allocate has (a little) less overhead in the kernel too.  */
+-      err = __vm_allocate (__mach_task_self (), &mapaddr, len, mapaddr == 0);
+-
+-      if (err == KERN_NO_SPACE)
+-      {
+-        if (flags & MAP_FIXED)
+-          {
+-            /* XXX this is not atomic as it is in unix! */
+-            /* The region is already allocated; deallocate it first.  */
+-            err = __vm_deallocate (__mach_task_self (), mapaddr, len);
+-            if (!err)
+-              err = __vm_allocate (__mach_task_self (), &mapaddr, len, 0);
+-          }
+-        else if (mapaddr != 0)
+-          err = __vm_allocate (__mach_task_self (), &mapaddr, len, 1);
+-      }
+-
+-      return err ? (__ptr_t) (long int) __hurd_fail (err) : (__ptr_t) mapaddr;
+-    }
+-
+   vmprot = VM_PROT_NONE;
+   if (prot & PROT_READ)
+     vmprot |= VM_PROT_READ;
diff --git a/debian/patches/series b/debian/patches/series
index ab07864..481fa2a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -152,6 +152,7 @@ hurd-i386/submitted-hurd-abilist.diff
 hurd-i386/cvs-errnos.d.diff
 hurd-i386/cvs-mach-syscalls.mk.diff
 hurd-i386/submitted-auxv.diff
+hurd-i386/submitted-anon-mmap-shared.diff
 
 i386/local-biarch.diff
 i386/local-cmov.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-glibc/glibc.git

Reply via email to