Re: [PATCH, RFD]: Unbreak no-mmu mmap

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Howells
Date: Wednesday, August 1, 2007 - 5:29 am

Bernd Schmidt <bernds_cb1@t-online.de> wrote:

There's a problem with your alteration to do_munmap() to split VMAs.  What
happens if an area of a file is mmap'd twice in a process?  Consider the
situation where two independent parts of a process (say two different
libraries) each map an area of the same file.  do_mmap_pgoff() will attempt to
share these regions if it can.

This can lead to you splitting the wrong VMA when someone comes along later to 
do an apparent partial unmap.

I'm currently working on something to give each NOMMU process its own list
VMAs rather than holding them in common.  This is so that I can add VMA
reservation (and more to the point, unreservation) which'll make some stuff
easier.

David
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH, RFD]: Unbreak no-mmu mmap, Bernd Schmidt, (Fri Jun 8, 6:53 am)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, Matt Mackall, (Sat Jun 9, 12:10 pm)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, Robin Getz, (Mon Jun 11, 2:08 pm)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, Mike Frysinger, (Mon Jun 11, 3:09 pm)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, Bernd Schmidt, (Mon Jun 11, 4:04 pm)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, Mike Frysinger, (Mon Jun 11, 4:22 pm)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, Robin Getz, (Tue Jun 19, 4:26 pm)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, Bryan Wu, (Tue Jun 19, 7:38 pm)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, Paul Mundt, (Tue Jun 19, 8:00 pm)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, Bryan Wu, (Tue Jun 19, 8:18 pm)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, David Howells, (Fri Jun 22, 5:59 am)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, David Howells, (Fri Jun 22, 6:35 am)
[PATCH] NOMMU: Unbreak no-mmu mmap, David Howells, (Fri Jun 22, 7:29 am)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, Greg Ungerer, (Tue Jun 26, 10:50 pm)
Re: [PATCH, RFD]: Unbreak no-mmu mmap, David Howells, (Wed Aug 1, 5:29 am)
[PATCH] NOMMU: Separate out VMAs, David Howells, (Fri Aug 3, 7:03 am)
Re: [PATCH] NOMMU: Separate out VMAs, Bernd Schmidt, (Tue Aug 7, 6:12 am)
Re: [PATCH] NOMMU: Separate out VMAs, David Howells, (Tue Aug 7, 6:17 am)
Re: [PATCH] NOMMU: Separate out VMAs, David Howells, (Tue Aug 7, 6:21 am)
Re: [PATCH] NOMMU: Separate out VMAs, Bernd Schmidt, (Tue Aug 7, 6:37 am)
Re: [PATCH] NOMMU: Separate out VMAs, David Howells, (Tue Aug 7, 7:03 am)
Re: [PATCH] NOMMU: Separate out VMAs, Bernd Schmidt, (Fri Aug 17, 4:49 am)
Re: [PATCH] NOMMU: Separate out VMAs, David Howells, (Mon Aug 20, 8:12 am)
Re: [PATCH] NOMMU: Separate out VMAs, Bernd Schmidt, (Mon Aug 20, 9:02 am)