2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 22:35:33 +00:00

dump: Collect mem+regs+sigmask atomically

The ptrace seize doesn't prevent signals from delivery. That said,
we should block the signals in the target task before dumping
anything which is signals-related, i.e. memory and registers.

But once we've blocked signals, we should dump registers before
unblocking them, since any postponed signal will screw things up.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
Pavel Emelyanov
2012-02-17 22:56:36 +04:00
committed by Cyrill Gorcunov
parent 447388d79b
commit 097bc0b967
6 changed files with 66 additions and 47 deletions

View File

@@ -98,6 +98,22 @@ typedef struct {
rt_sigset_t rt_sa_mask;
} rt_sigaction_t;
#define _KNSIG 64
# define _NSIG_BPW 64
#define _KNSIG_WORDS (_KNSIG / _NSIG_BPW)
typedef struct {
unsigned long sig[_KNSIG_WORDS];
} k_rtsigset_t;
static inline void ksigfillset(k_rtsigset_t *set)
{
int i;
for (i = 0; i < _KNSIG_WORDS; i++)
set->sig[i] = (unsigned long)-1;
}
typedef struct {
unsigned int entry_number;
unsigned int base_addr;