Re: [PATCH] uprobes: Refuse to insert a probe into MAP_SHARED vma

2014-04-28 Thread Oleg Nesterov
And of course, I forgot to add Hugh ;) Fix that. On 04/28, Oleg Nesterov wrote: > > valid_vma() rejects the VM_SHARED vmas, but this still allows to insert > a probe into the MAP_SHARED but not VM_MAYWRITE vma. > > Currently this is fine, such a mapping doesn't really differ from the > private re

[PATCH] uprobes: Refuse to insert a probe into MAP_SHARED vma

2014-04-28 Thread Oleg Nesterov
valid_vma() rejects the VM_SHARED vmas, but this still allows to insert a probe into the MAP_SHARED but not VM_MAYWRITE vma. Currently this is fine, such a mapping doesn't really differ from the private read-only mmap except mprotect(PROT_WRITE) won't work. However, get_user_pages(FOLL_WRITE | FOL