aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@chromium.org>2014-06-06 14:36:42 -0700
committerBen Hutchings <ben@decadent.org.uk>2014-07-11 13:33:47 +0100
commit0b8ad905025a3b00172bcd245072a3ba98db0a52 (patch)
tree953918ca2092ed2f3d034e56f4f3c52d902f20bc /lib
parent6df2529a3af404bc367fcf37cd3203c1d4951675 (diff)
downloadkernel_samsung_smdk4412-0b8ad905025a3b00172bcd245072a3ba98db0a52.zip
kernel_samsung_smdk4412-0b8ad905025a3b00172bcd245072a3ba98db0a52.tar.gz
kernel_samsung_smdk4412-0b8ad905025a3b00172bcd245072a3ba98db0a52.tar.bz2
ptrace: fix fork event messages across pid namespaces
commit 4e52365f279564cef0ddd41db5237f0471381093 upstream. 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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions