On 7 May 2012 12:38, Alexander Graf <ag...@suse.de> wrote: > And the below patch on top of my revised patch fixes it. > The question is whether we still need to flush on mmap() then?
IIRC the kernel will let you MAP_FIXED mmap a file to an address that's already mmap'd for something else without having to munmap the previous mapping. So yes, we still need to flush on mmap I think. Also I think you need mprotect() for the case of: mmap(...,PROT_EXEC) execute mprotect(not PROT_EXEC) try to execute again -- PMM