diff options
author | Oleg Nesterov <oleg@redhat.com> | 2012-09-16 19:31:39 +0200 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2012-09-29 21:21:54 +0200 |
commit | e40cfce626a5537994058ee9a940dcfdc0f68ef0 (patch) | |
tree | ce9a24a51906fb3437ea0f08851e4dfb4671aa0b /kernel/workqueue_sched.h | |
parent | 78a320542e6cdb2800cd736b2d136e4261d34f43 (diff) | |
download | blackbird-obmc-linux-e40cfce626a5537994058ee9a940dcfdc0f68ef0.tar.gz blackbird-obmc-linux-e40cfce626a5537994058ee9a940dcfdc0f68ef0.zip |
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 <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/workqueue_sched.h')
0 files changed, 0 insertions, 0 deletions