From: Christian Brauner <christian@brauner.io>
To: Kees Cook <keescook@chromium.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Jack Andersen <jackoalan@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Oleg Nesterov <oleg@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] signal: always allocate siginfo for SI_TKILL
Date: Mon, 4 Feb 2019 16:10:08 +0100 [thread overview]
Message-ID: <20190204151007.ps2gkerx5cgetrfv@brauner.io> (raw)
In-Reply-To: <CAGXu5jLGgCChpxt3ee8kSi2pTKPd9baHt_uZvTG6qqi8oFK2UQ@mail.gmail.com>
On Sun, Feb 03, 2019 at 10:33:55AM -0800, Kees Cook wrote:
> On Sun, Feb 3, 2019 at 12:39 AM Christian Brauner <christian@brauner.io> wrote:
> >
> > On Sat, Feb 02, 2019 at 09:49:38PM -1000, Jack Andersen wrote:
> > > The patch titled
> > > `signal: Never allocate siginfo for SIGKILL or SIGSTOP`
> > > created a regression for users of PTRACE_GETSIGINFO needing to
> > > discern signals that were raised via the tgkill syscall.
> > >
> > > A notable user of this tgkill+ptrace combination is lldb while
> > > debugging a multithreaded program. Without the ability to detect a
> > > SIGSTOP originating from tgkill, lldb does not have a way to
> > > synchronize on a per-thread basis and falls back to SIGSTOP-ing the
> > > entire process.
> > >
> > > This patch allocates the siginfo as it did previously whenever the
> > > SI_TKILL code is present.
> > >
> > > Signed-off-by: Jack Andersen <jackoalan@gmail.com>
> >
> > The commit you're trying to fix has been discussed before wrt to
> > seccomp tests:
> >
> > commit 2bd61abead58c82714a1f6fa6beb0fd0df6a6d13
> > Author: Kees Cook <keescook@chromium.org>
> > Date: Thu Dec 6 15:50:38 2018 -0800
> >
> > selftests/seccomp: Remove SIGSTOP si_pid check
> >
> > Commit f149b3155744 ("signal: Never allocate siginfo for SIGKILL or SIGSTOP")
> > means that the seccomp selftest cannot check si_pid under SIGSTOP anymore.
> > Since it's believed[1] there are no other userspace things depending on the
> > old behavior, this removes the behavioral check in the selftest, since it's
> > more a "extra" sanity check (which turns out, maybe, not to have been
> > useful to test).
> >
> > [1] https://lkml.kernel.org/r/CAGXu5jJaZAOzP1qFz66tYrtbuywqb+UN2SOA1VLHpCCOiYvYeg@mail.gmail.com
> >
> > Reported-by: Tycho Andersen <tycho@tycho.ws>
> > Suggested-by: Eric W. Biederman <ebiederm@xmission.com>
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> > Signed-off-by: Shuah Khan <shuah@kernel.org>
> >
> > Ccing Kees on this. Seems that this commit might be worth given that
> > there's some parts of userspace relying on it and not just internal
> > kernel tests.
>
> Yup, so this is the "real" userspace example that Eric was looking for.
>
> Eric, how does the proposed fix look? I'd also like to revert my
I think Eric's proposal in [1] is better. Iiuc, the proposed fix here
doesn't restore the behavior for seccomp. I'd rather have you or Jack
pick up Eric's fix with a Suggested-by for Eric in there and then
restore the old behavior. I'd feel comfortable acking this.
Once we have that you can revert the seccomp fix you sent. Later we can
think about Eric's proposal to make siginfo_t allocation more robust.
Christian
[1]: https://lore.kernel.org/lkml/87zhtthkuy.fsf@xmission.com/
next prev parent reply other threads:[~2019-02-04 15:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-03 7:49 Jack Andersen
2019-02-03 8:39 ` Christian Brauner
2019-02-03 18:33 ` Kees Cook
2019-02-04 15:10 ` Christian Brauner [this message]
2019-02-05 2:41 ` Eric W. Biederman
2019-02-05 6:37 ` Linus Torvalds
2019-02-05 6:46 ` Eric W. Biederman
2019-02-05 14:16 ` [PATCH] signal: Always attempt to allocate siginfo for SIGSTOP Eric W. Biederman
2019-02-05 14:49 ` Kees Cook
2019-02-05 11:23 ` [PATCH] signal: always allocate siginfo for SI_TKILL Christian Brauner
2019-02-28 4:56 ` [LKP] [signal] b3eedf8d5b: BUG:unable_to_handle_kernel kernel test robot
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=20190204151007.ps2gkerx5cgetrfv@brauner.io \
--to=christian@brauner.io \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=jackoalan@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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
Powered by JetHome