From: Oleg Nesterov Date: Sun, 16 Sep 2012 17:31:39 +0000 (+0200) Subject: uprobes: Restrict valid_vma(false) to skip VM_SHARED vmas X-Git-Tag: v3.7-rc3~40^2~1^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e40cfce626a5537994058ee9a940dcfdc0f68ef0;p=pandora-kernel.git uprobes: Restrict valid_vma(false) to skip VM_SHARED vmas 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(true). This can also speedup uprobe_munmap() and uprobe_unregister(). Note: even after this patch _unregister can confuse the probed application if it does mprotect(PROT_WRITE) after _register and installs "int3", but this is hardly possible to avoid and this doesn't differ from gdb case. Signed-off-by: Oleg Nesterov Acked-by: Srikar Dronamraju --- Reading git-diff-tree failed