[CRIU] [PATCH 2/3] check: check PTRACE_{GET,SET}SIGMASK

Andrey Vagin avagin at openvz.org
Thu Jun 6 06:35:34 EDT 2013


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-check.c       | 6 ++++++
 include/ptrace.h | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/cr-check.c b/cr-check.c
index da6053a..a33f30d 100644
--- a/cr-check.c
+++ b/cr-check.c
@@ -468,6 +468,7 @@ int check_ptrace_peeksiginfo()
 	struct ptrace_peeksiginfo_args arg;
 	siginfo_t siginfo;
 	pid_t pid, ret = 0;
+	k_rtsigset_t mask;
 
 	if (opts.check_ms_kernel) {
 		pr_warn("Skipping peeking siginfos check (not yet merged)\n");
@@ -497,6 +498,11 @@ int check_ptrace_peeksiginfo()
 		ret = -1;
 	}
 
+	if (ptrace(PTRACE_GETSIGMASK, pid, sizeof(mask), &mask) != 0) {
+		pr_perror("Unable to dump signal blocking mask");
+		ret = -1;
+	}
+
 	ptrace(PTRACE_KILL, pid, NULL, NULL);
 
 	return ret;
diff --git a/include/ptrace.h b/include/ptrace.h
index 4d1bc92..61c3b6a 100644
--- a/include/ptrace.h
+++ b/include/ptrace.h
@@ -27,6 +27,9 @@ struct ptrace_peeksiginfo_args {
 #define PTRACE_PEEKSIGINFO_SHARED       (1 << 0)
 #endif
 
+#define PTRACE_GETSIGMASK	0x420a
+#define PTRACE_SETSIGMASK	0x420b
+
 #define PTRACE_SEIZE_DEVEL	0x80000000
 
 #define PTRACE_EVENT_FORK	1
-- 
1.8.2



More information about the CRIU mailing list