[CRIU] [PATCH 2/8] check: check PTRACE_{GET,SET}SIGMASK
Andrey Vagin
avagin at openvz.org
Thu Jul 11 05:46:49 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 a6f4aa9..a68a763 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;
pid = fork();
if (pid < 0)
@@ -492,6 +493,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.3.1
More information about the CRIU
mailing list