]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ptrace: add ability to get/set signal-blocked mask
authorAndrey Vagin <avagin@openvz.org>
Wed, 19 Jun 2013 00:08:17 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:27:39 +0000 (17:27 +1000)
commit0d1619dd619660b017b6626b89e82f46fda24d40
tree5bac0bf821bc4c990a863f2d004a832eb941d376
parentab1a689340a492c6bf3de141f661db43c171897f
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