From: Oleg Nesterov <oleg@redhat.com>
To: Jann Horn <jannh@google.com>
Cc: Christian Brauner <christian@brauner.io>,
"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: Mon, 8 Apr 2019 15:13:16 +0200 [thread overview]
Message-ID: <20190408131315.GA24111@redhat.com> (raw)
In-Reply-To: <20190330021232.191205-1-jannh@google.com>
On 03/30, Jann Horn wrote:
>
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -3605,16 +3605,11 @@ SYSCALL_DEFINE4(pidfd_send_signal, int, pidfd, int, sig,
> if (unlikely(sig != kinfo.si_signo))
> goto err;
>
> + /* Only allow sending arbitrary signals to yourself. */
> + ret = -EPERM;
> if ((task_pid(current) != pid) &&
> - (kinfo.si_code >= 0 || kinfo.si_code == SI_TKILL)) {
> - /* Only allow sending arbitrary signals to yourself. */
> - ret = -EPERM;
> - if (kinfo.si_code != SI_USER)
> - goto err;
> -
> - /* Turn this into a regular kill signal. */
> - prepare_kill_siginfo(sig, &kinfo);
> - }
> + (kinfo.si_code >= 0 || kinfo.si_code == SI_TKILL))
> + goto err;
ACK.
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.
Oleg.
next prev parent reply other threads:[~2019-04-08 13:13 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 [this message]
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
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=20190408131315.GA24111@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.