Richard Braun, on Sat 02 Apr 2016 20:55:58 +0200, wrote: > On Sat, Apr 02, 2016 at 01:35:49PM -0300, Agustina Arzille wrote: > > As a workaround, we could always use 'vm_map', no matter what, since the > > idea that 'vm_allocate' has a little less overhead is somewhat bogus to me, > > or > > keep using 'vm_allocate', but do an additional 'vm_inherit' if the user > > specified > > a shared mapping. > > > > What do you guys think? > > I completely agree with using vm_map unconditionnally
Indeed, both calls quickly end up in vm_map_enter anyway, so I don't see the point in making a special case in mmap(), especially if there is a bug in there :) So the fix would be just to remove the whole if ((flags & (MAP_TYPE|MAP_INHERIT)) == MAP_ANON block? You can submit that patch to the libc-al...@sourceware.org mailing list (explaining the rationale etc. alongside), putting rol...@hack.frob.com and this bug-hurd@gnu.org list in Cc. And we can commit the patch to the debian libc in parallel. Samuel