From: Oleg Nesterov <oleg@redhat.com>
To: Christian Brauner <christian@brauner.io>
Cc: Jann Horn <jannh@google.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Arnd Bergmann <arnd@arndb.de>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] signal: don't silently convert SI_USER signals to non-current pidfd
Date: Wed, 17 Apr 2019 15:50:03 +0200 [thread overview]
Message-ID: <20190417135002.GF32622@redhat.com> (raw)
In-Reply-To: <20190417131904.qjkv2xuenhcsz36l@brauner.io>
On 04/17, Christian Brauner wrote:
>
> On Wed, Apr 17, 2019 at 03:16:03PM +0200, Oleg Nesterov wrote:
> > On 04/17, Christian Brauner wrote:
> > >
> > > On Mon, Apr 08, 2019 at 03:13:16PM +0200, Oleg Nesterov wrote:
> > > >
> > > > but perhaps it should always fail, even if task_pid(current) == pid.
> > > >
> > > > sys_rt_sigqueueinfo() allows to send any siginfo to yourself, but this is only needed
> > > > for checkpoint/restart.
> > >
> > > Yes, that's why this was added. I would leave it in exactly because of
> > > checkpoint/restart.
> >
> > I don't understand...
> >
> > c/r doesn't need this "feature" in pidfd_send_signal(), so it can be removed.
> > But,
>
> Just out of curiosity: in what sense? They don't need it since they have
> other ways of doing this
Yes. The restarting process needs to "restore" the pending signals, including the
signals with si_code >= 0. It does this using tgsigqueueinfo() and that is why we
allow this if the signal sent to itself.
So criu simply doesn't need pidfd_send_signal() to do this. And at the same time,
> or they *can't* use it for some other reason
Yes again. pidfd_send_signal() does kill_pid_info(), so it can't be used to restore
the "per-thread" task->pending signals.
Oleg.
next prev parent reply other threads:[~2019-04-17 13:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-30 2:12 [PATCH] signal: don't silently convert SI_USER signals to non-current pidfd Jann Horn
2019-03-30 2:17 ` Christian Brauner
2019-04-08 13:13 ` Oleg Nesterov
2019-04-17 13:03 ` Christian Brauner
2019-04-17 13:16 ` Oleg Nesterov
2019-04-17 13:19 ` Christian Brauner
2019-04-17 13:50 ` Oleg Nesterov [this message]
2019-04-17 14:13 ` Christian Brauner
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=20190417135002.GF32622@redhat.com \
--to=oleg@redhat.com \
--cc=arnd@arndb.de \
--cc=christian@brauner.io \
--cc=ebiederm@xmission.com \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.