[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shared mappings not being inherited by children
From: |
Samuel Thibault |
Subject: |
Re: Shared mappings not being inherited by children |
Date: |
Sun, 3 Apr 2016 11:27:48 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
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-alpha@sourceware.org mailing list
(explaining the rationale etc. alongside), putting roland@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
Re: Shared mappings not being inherited by children, Samuel Thibault, 2016/04/04