alistair23-linux/kernel/events
Oleg Nesterov 3ab6796617 uprobes: Teach uprobe_copy_process() to handle CLONE_VFORK
uprobe_copy_process() does nothing if the child shares ->mm with
the forking process, but there is a special case: CLONE_VFORK.
In this case it would be more correct to do dup_utask() but avoid
dup_xol(). This is not that important, the child should not unwind
its stack too much, this can corrupt the parent's stack, but at
least we need this to allow to ret-probe __vfork() itself.

Note: in theory, it would be better to check task_pt_regs(p)->sp
instead of CLONE_VFORK, we need to dup_utask() if and only if the
child can return from the function called by the parent. But this
needs the arch-dependant helper, and I think that nobody actually
does clone(same_stack, CLONE_VM).

Reported-by: Martin Cermak <mcermak@redhat.com>
Reported-by: David Smith <dsmith@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
2013-10-29 18:02:55 +01:00
..
callchain.c perf: Roll back callchain buffer refcount under the callchain mutex 2013-08-16 17:55:50 +02:00
core.c perf: Fix the perf context switch optimization 2013-10-29 14:13:01 +01:00
hw_breakpoint.c hw_breakpoint: Introduce "struct bp_cpuinfo" 2013-06-20 17:58:57 +02:00
internal.h perf: Fix mmap() accounting hole 2013-06-19 12:44:13 +02:00
Makefile
ring_buffer.c perf: Fix vmalloc ring buffer pages handling 2013-05-01 12:34:46 +02:00
uprobes.c uprobes: Teach uprobe_copy_process() to handle CLONE_VFORK 2013-10-29 18:02:55 +01:00