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
-