[lkml]   [2019]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] signal: always allocate siginfo for SI_TKILL
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 <>

The commit you're trying to fix has been discussed before wrt to
seccomp tests:

commit 2bd61abead58c82714a1f6fa6beb0fd0df6a6d13
Author: Kees Cook <>
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).


Reported-by: Tycho Andersen <>
Suggested-by: Eric W. Biederman <>
Signed-off-by: Kees Cook <>
Signed-off-by: Shuah Khan <>

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.


 \ /
  Last update: 2019-02-03 09:40    [W:0.124 / U:4.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site