alistair23-linux/kernel/events
Oleg Nesterov e40cfce626 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>
2012-09-29 21:21:54 +02:00
..
callchain.c perf: Add attribute to filter out callchains 2012-08-10 12:40:57 -03:00
core.c perf: Add ability to attach user stack dump to sample 2012-08-10 12:17:58 -03:00
hw_breakpoint.c Merge branch 'x86/cleanups' into perf/uprobes 2012-03-13 16:33:03 +01:00
internal.h perf: Add ability to attach user stack dump to sample 2012-08-10 12:17:58 -03:00
Makefile uprobes: Move to kernel/events/ 2012-02-22 11:08:00 +01:00
ring_buffer.c perf: Add perf_output_skip function to skip bytes in sample 2012-08-10 12:16:22 -03:00
uprobes.c uprobes: Restrict valid_vma(false) to skip VM_SHARED vmas 2012-09-29 21:21:54 +02:00