signal fixes for v5.0-rc6
Linus,
Please pull the for-linus branch from the git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git for-linus
HEAD:7146db3317c67b517258cb5e1b08af387da0618b signal: Better detection of synchronous signals
This contains 4 small fixes for signal handling. A missing range check, a regression fix, prioritizing signals we have already started a signal group exit for, and better detection of synchronous signals.
The confused decision of which signals to handle failed spectacularly when a timer was pointed at SIGBUS and the stack overflowed. Resulting in an unkillable process in an infinite loop instead of a SIGSEGV and core dump.
Eric W. Biederman (4):
signal: Make siginmask safe when passed a signal of 0
signal: Always attempt to allocate siginfo for SIGSTOP
signal: Always notice exiting tasks
signal: Better detection of synchronous signals
include/linux/signal.h | 2 +- kernel/signal.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 60 insertions(+), 5 deletions(-)
Eric
The pull request you sent on Fri, 08 Feb 2019 09:52:02 -0600:
The pull request you sent on Fri, 08 Feb 2019 09:52:02 -0600:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.gitfor-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/6b2912cedc238c984e6a4039836ed9c911121076
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker
Quoted 2 lines · Eric W. Biederman
signal: Always notice exiting tasks
Sorry, I could not look at these patches before...
So I think this one should be reverted, it makes PTRACE_EVENT_EXIT even more broken.
Once again, why we can't do something like
--- x/kernel/signal.c
+++ x/kernel/signal.c
@@ -209,6 +209,8 @@ int next_signal(struct sigpending *pendi
*/
x = *s &~ *m;
if (x) {
+ if (x & sigmask(SIGKILL))
+ return SIGKILL;
if (x & SYNCHRONOUS_MASK)
x &= SYNCHRONOUS_MASK;
sig = ffz(~x) + 1;instead? at least for the start.
Oleg.