]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ptrace: add ability to get/set signal-blocked mask
authorAndrey Vagin <avagin@openvz.org>
Thu, 27 Jun 2013 23:53:49 +0000 (09:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:54 +0000 (16:38 +1000)
commit9380ec351387cc78240b975c45bd1f39aa6a9e65
treeda4bbd7a629e28e165acc57cd15bcfd8743cd0dd
parenta2e987b792c3bec31e44fd6dd079f93dc837e884
ptrace: add ability to get/set signal-blocked mask

crtools uses a parasite code for dumping processes.  The parasite code is
injected into a process with help PTRACE_SEIZE.

Currently crtools blocks signals from a parasite code.  If a process has
pending signals, crtools wait while a process handles these signals.

This method is not suitable for stopped tasks.  A stopped task can have a
few pending signals, when we will try to execute a parasite code, we will
need to drop SIGSTOP, but all other signals must remain pending, because a
state of processes must not be changed during checkpointing.

This patch adds two ptrace commands to set/get signal-blocked mask.

I think gdb can use this commands too.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/uapi/linux/ptrace.h
kernel/ptrace.c