From: Andrew Morton <akpm@linux-foundation.org>
To: "Dmitry V. Levin" <ldv@altlinux.org>
Cc: Andrei Vagin <avagin@gmail.com>, Oleg Nesterov <oleg@redhat.com>,
linux-kernel@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [RESEND PATCH] ptrace: take into account saved_sigmask in PTRACE_{GET,SET}SIGMASK
Date: Tue, 19 Mar 2019 15:58:04 -0700 [thread overview]
Message-ID: <20190319155804.277fec5dba6a93ad2ab3edbc@linux-foundation.org> (raw)
In-Reply-To: <20190319223252.GA19424@altlinux.org>
On Wed, 20 Mar 2019 01:32:53 +0300 "Dmitry V. Levin" <ldv@altlinux.org> wrote:
> On Tue, Mar 19, 2019 at 12:19:57PM -0700, Andrei Vagin wrote:
> > 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_GET_SIGMASK returns saved_sigmask
> > is it's set. PTRACE_SETSIGMASK drops the TIF_RESTORE_SIGMASK flag.
>
> If it's not too late, could somebody tweak the commit message so that
> PTRACE_GET_SIGMASK becomes PTRACE_GETSIGMASK and "is it's set" is changed
> to "if it's set", please?
I made those changes to my copy.
next prev parent reply other threads:[~2019-03-19 22:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 19:19 Andrei Vagin
2019-03-19 22:32 ` Dmitry V. Levin
2019-03-19 22:58 ` Andrew Morton [this message]
2019-03-20 13:27 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190319155804.277fec5dba6a93ad2ab3edbc@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=avagin@gmail.com \
--cc=ebiederm@xmission.com \
--cc=ldv@altlinux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®