Re: [PATCH 3/3] uprobes: Restrict valid_vma(false) to skip VM_SHARED

2012-09-25 Thread Oleg Nesterov
On 09/25, Srikar Dronamraju wrote: > > * Oleg Nesterov [2012-09-16 19:52:48]: > > > This can also > > speedup uprobe_munmap() and uprobe_unregister(). > > > > I didnt get how it speeds up uprobe_munmap() and uprobe_unregister()? Say, uprobe_unregister()->..->build_map_info() can skip VM_SHARED vm

Re: [PATCH 3/3] uprobes: Restrict valid_vma(false) to skip VM_SHARED

2012-09-25 Thread Srikar Dronamraju
* Oleg Nesterov [2012-09-16 19:52:48]: > valid_vma(false) ignores ->vm_flags, this is not actually right. > We should never try to write into MAP_SHARED mapping, this can > confuse an apllication which actually writes to ->vm_file. Agree, > > With this patch valid_vma(false) ignores VM_WRITE o

[PATCH 3/3] uprobes: Restrict valid_vma(false) to skip VM_SHARED

2012-09-16 Thread Oleg Nesterov
valid_vma(false) ignores ->vm_flags, this is not actually right. We should never try to write into MAP_SHARED mapping, this can confuse an apllication which actually writes to ->vm_file. With this patch valid_vma(false) ignores VM_WRITE only but checks other (immutable) bits checked by valid_vma(t