From: Christian Brauner <christian.brauner@ubuntu.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Linux Containers <containers@lists.linux-foundation.org>,
Christof Meerwald <cmeerw@cmeerw.org>,
linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH] signal: Avoid corrupting si_pid and si_uid in do_notify_parent
Date: Tue, 21 Apr 2020 17:08:40 +0200
Message-ID: <20200421150840.gevtsrhdec5wwg6y@wittgenstein> (raw)
In-Reply-To: <871rog6g56.fsf@x220.int.ebiederm.org>
On Tue, Apr 21, 2020 at 09:57:09AM -0500, Eric W. Biederman wrote:
> Christian Brauner <christian.brauner@ubuntu.com> writes:
>
> > On Mon, Apr 20, 2020 at 12:05:38PM -0500, Eric W. Biederman wrote:
> >> diff --git a/kernel/signal.c b/kernel/signal.c
> >> index 9899c5f91ee1..a88a89422227 100644
> >> --- a/kernel/signal.c
> >> +++ b/kernel/signal.c
> >> @@ -1993,8 +1993,12 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
> >> if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN)
> >> sig = 0;
> >> }
> >> + /*
> >> + * Bypass send_signal as the si_pid and si_uid values have
> >> + * been generated in the parent's namespaces.
> >> + */
> >
> > At first I misread that comment as saying that we're skipping sending a
> > signal not that it relates to a specific function (and I won't admit that
> > I wrote a whole long paragraph on why I'm confused we're skipping
> > sending signals on invalid si_pid and si_uid...).
>
> I have updated the comment to read:
> + /*
> + * Send with __send_signal as si_pid and si_uid are in the
> + * parent's namespaces.
> + */
>
> That should be enough of a hint for someone to read the code and figure
> out what is going on.
Perfect, thanks!
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Christian
next prev parent reply index
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-19 20:13 SIGCHLD signal sometimes sent with si_pid==0 (Linux 5.6.5) Christof Meerwald
2020-04-20 17:05 ` [PATCH] signal: Avoid corrupting si_pid and si_uid in do_notify_parent Eric W. Biederman
2020-04-21 8:30 ` Christian Brauner
2020-04-21 9:28 ` Oleg Nesterov
2020-04-21 10:21 ` Christian Brauner
2020-04-21 11:11 ` Oleg Nesterov
2020-04-21 11:26 ` Christian Brauner
2020-04-21 12:17 ` Oleg Nesterov
2020-04-21 12:59 ` Christian Brauner
2020-04-21 13:42 ` Eric W. Biederman
2020-04-21 11:28 ` Oleg Nesterov
2020-04-21 11:38 ` Christian Brauner
2020-04-21 10:28 ` Christian Brauner
2020-04-21 14:57 ` Eric W. Biederman
2020-04-21 15:08 ` Christian Brauner [this message]
2020-04-21 9:04 ` Oleg Nesterov
2020-04-21 10:19 ` [PATCH] remove the no longer needed pid_alive() check in __task_pid_nr_ns() Oleg Nesterov
2020-04-21 10:50 ` Christian Brauner
2020-04-21 15:05 ` Eric W. Biederman
2020-04-24 18:05 ` Oleg Nesterov
2020-04-24 19:54 ` Eric W. Biederman
2020-04-21 14:59 ` SIGCHLD signal sometimes sent with si_pid==0 (Linux 5.6.5) Eric W. Biederman
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=20200421150840.gevtsrhdec5wwg6y@wittgenstein \
--to=christian.brauner@ubuntu.com \
--cc=cmeerw@cmeerw.org \
--cc=containers@lists.linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
/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
LKML Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
linux-kernel@vger.kernel.org
public-inbox-index lkml
Example config snippet for mirrors
Newsgroup available over NNTP:
nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git