summaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
authorMatthew Dempsky2014-06-06 23:36:42 +0200
committerLinus Torvalds2014-06-07 01:08:11 +0200
commit4e52365f279564cef0ddd41db5237f0471381093 (patch)
tree6f9b4c19ea6bd5b80c22f59340923174ac4dee3c /kernel/signal.c
parentDocumentation/memory-barriers.txt: fix important typo re memory barriers (diff)
downloadkernel-qcow2-linux-4e52365f279564cef0ddd41db5237f0471381093.tar.gz
kernel-qcow2-linux-4e52365f279564cef0ddd41db5237f0471381093.tar.xz
kernel-qcow2-linux-4e52365f279564cef0ddd41db5237f0471381093.zip
ptrace: fix fork event messages across pid namespaces
When tracing a process in another pid namespace, it's important for fork event messages to contain the child's pid as seen from the tracer's pid namespace, not the parent's. Otherwise, the tracer won't be able to correlate the fork event with later SIGTRAP signals it receives from the child. We still risk a race condition if a ptracer from a different pid namespace attaches after we compute the pid_t value. However, sending a bogus fork event message in this unlikely scenario is still a vast improvement over the status quo where we always send bogus fork event messages to debuggers in a different pid namespace than the forking process. Signed-off-by: Matthew Dempsky <mdempsky@chromium.org> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Julien Tinnes <jln@chromium.org> Cc: Roland McGrath <mcgrathr@chromium.org> Cc: Jan Kratochvil <jan.kratochvil@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/signal.c')
0 files changed, 0 insertions, 0 deletions