summaryrefslogtreecommitdiffstats
path: root/drivers/xen/pcpu.c
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@gmail.com>2019-03-28 20:44:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-29 10:01:37 -0700
commitfcfc2aa0185f4a731d05a21e9f359968fdfd02e7 (patch)
treebe2e72904e527207f223eeb070b94062999ebdbf /drivers/xen/pcpu.c
parenteebf36480678f948b3ed15d56ca7b8e6194e7c18 (diff)
downloadlinux-fcfc2aa0185f4a731d05a21e9f359968fdfd02e7.tar.bz2
ptrace: take into account saved_sigmask in PTRACE{GET,SET}SIGMASK
There are a few system calls (pselect, ppoll, etc) which replace a task sigmask while they are running in a kernel-space When a task calls one of these syscalls, the kernel saves a current sigmask in task->saved_sigmask and sets a syscall sigmask. On syscall-exit-stop, ptrace traps a task before restoring the saved_sigmask, so PTRACE_GETSIGMASK returns the syscall sigmask and PTRACE_SETSIGMASK does nothing, because its sigmask is replaced by saved_sigmask, when the task returns to user-space. This patch fixes this problem. PTRACE_GETSIGMASK returns saved_sigmask if it's set. PTRACE_SETSIGMASK drops the TIF_RESTORE_SIGMASK flag. Link: http://lkml.kernel.org/r/20181120060616.6043-1-avagin@gmail.com Fixes: 29000caecbe8 ("ptrace: add ability to get/set signal-blocked mask") Signed-off-by: Andrei Vagin <avagin@gmail.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/xen/pcpu.c')
0 files changed, 0 insertions, 0 deletions