Commit 206187db authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

check: check PTRACE_{GET,SET}SIGMASK

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent c2c44d52
...@@ -468,6 +468,7 @@ int check_ptrace_peeksiginfo() ...@@ -468,6 +468,7 @@ int check_ptrace_peeksiginfo()
struct ptrace_peeksiginfo_args arg; struct ptrace_peeksiginfo_args arg;
siginfo_t siginfo; siginfo_t siginfo;
pid_t pid, ret = 0; pid_t pid, ret = 0;
k_rtsigset_t mask;
pid = fork(); pid = fork();
if (pid < 0) if (pid < 0)
...@@ -492,6 +493,11 @@ int check_ptrace_peeksiginfo() ...@@ -492,6 +493,11 @@ int check_ptrace_peeksiginfo()
ret = -1; 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); ptrace(PTRACE_KILL, pid, NULL, NULL);
return ret; return ret;
......
...@@ -27,6 +27,9 @@ struct ptrace_peeksiginfo_args { ...@@ -27,6 +27,9 @@ struct ptrace_peeksiginfo_args {
#define PTRACE_PEEKSIGINFO_SHARED (1 << 0) #define PTRACE_PEEKSIGINFO_SHARED (1 << 0)
#endif #endif
#define PTRACE_GETSIGMASK 0x420a
#define PTRACE_SETSIGMASK 0x420b
#define PTRACE_SEIZE_DEVEL 0x80000000 #define PTRACE_SEIZE_DEVEL 0x80000000
#define PTRACE_EVENT_FORK 1 #define PTRACE_EVENT_FORK 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment