Re: [PATCH] recognize MAP_LOCKED in mmap() call
From: Andrew Morton <hidden>
Date: 2002-09-18 16:24:47
Also in:
lkml
Hubertus Franke wrote:
Andrew, at the current time an mmap() ignores a MAP_LOCKED passed to it. The only way we can get VM_LOCKED associated with the newly created VMA is to have previously called mlockall() on the process which sets the mm->def_flags != VM_LOCKED or subsequently call mlock() on the newly created VMA. The attached patch checks for MAP_LOCKED being passed and if so checks the capabilities of the process. Limit checks were already in place.
Looks sane, thanks.
It appears that MAP_LOCKED is a Linux-special, so presumably it
_used_ to work. I wonder when it broke?
You patch applies to 2.4 as well; it would be useful to give that
a sanity test and send a copy to Marcelo.
(SuS really only anticipates that mmap needs to look at prior mlocks
in force against the address range. It also says
Process memory locking does apply to shared memory regions,
and we don't do that either. I think we should; can't see why SuS
requires this.)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/