Skip to content

Removing SEND_SIG_FORCED

Eric W. Biederman linux-api lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10signal: Always ignore SIGKILL and SIGSTOP sent to the global initkernel/signal.c+4 -00 replies
2/10signal: Properly deliver SIGILL from uprobeskernel/events/uprobes.c+2 -20 replies
3/10signal: Properly deliver SIGSEGV from x86 uprobesarch/x86/kernel/uprobes.c+1 -10 replies
4/10signal: Always deliver the kernel's SIGKILL and SIGSTOP to a pid namespace initkernel/signal.c+1 -10 replies
5/10signal: send_sig_all no longer needs SEND_SIG_FORCEDdrivers/tty/sysrq.c+1 -10 replies
6/10signal: Remove the siginfo paramater from kernel_dqueue_signaldrivers/usb/gadget/function/f_mass_storage.c fs/jffs2/background.c include/linux/sched/signal.h+4 -40 replies
7/10signal: Don't send siginfo to kthreads.drivers/usb/gadget/function/f_mass_storage.c kernel/signal.c+2 -20 replies
8/10signal: Never allocate siginfo for SIGKILL or SIGSTOPkernel/signal.c+4 -30 replies
9/10signal: Use SEND_SIG_PRIV not SEND_SIG_FORCED with SIGKILL and SIGSTOPkernel/pid_namespace.c kernel/ptrace.c mm/oom_kill.c+5 -50 replies
10/10signal: Remove SEND_SIG_FORCEDinclude/linux/sched/signal.h include/trace/events/signal.h kernel/signal.c+4 -70 replies

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchThomas Gleixner
SeriesR-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/10] Removing SEND_SIG_FORCED

SEND_SIG_FORCED has two functions. It forces a pid namespace init to receive a signal it would ordinarily ignore, and it causes a siginfo to not be allocated for a signal.

This patchset makes __send_signal a little bit smarter so that it can detect when to apply these optimizations and the senders of signals don't have to worry about them.

The coupling of forcing a signal to the pid namespace init and not allocating siginfo resulted in serveral minor bugs where a signal sent by the kernel was marked SI_USER suggesting another userspace process sent that signal. I have cc'd linux-api in case anyone cares about these minor userspace visible differences.

Unless someone notices a bug I intend to merge these changes through my
tree during the next merge window. While there are numerous fixes here
none of them appear to be the kind that fixes real world problems so I don't see any urgency here.

Please look read and send my your review. I will be out for about a week so I will address any comments when I get back.

Eric W. Biederman (10):
signal: Always ignore SIGKILL and SIGSTOP sent to the global init
signal: Properly deliver SIGILL from uprobes
signal: Properly deliver SIGSEGV from x86 uprobes
signal: Always deliver the kernel's SIGKILL and SIGSTOP to a pid namespace init
signal: send_sig_all no longer needs SEND_SIG_FORCED
signal: Remove the siginfo paramater from kernel_dqueue_signal
signal: Don't send siginfo to kthreads.
signal: Never allocate siginfo for SIGKILL or SIGSTOP
signal: Use SEND_SIG_PRIV not SEND_SIG_FORCED with SIGKILL and SIGSTOP
signal: Remove SEND_SIG_FORCED

 arch/x86/kernel/uprobes.c                    |  2 +-
 drivers/tty/sysrq.c                          |  2 +-
 drivers/usb/gadget/function/f_mass_storage.c |  4 ++--
 fs/jffs2/background.c                        |  2 +-
 include/linux/sched/signal.h                 |  5 ++---
 include/trace/events/signal.h                |  3 +--
 kernel/events/uprobes.c                      |  4 ++--
 kernel/pid_namespace.c                       |  2 +-
 kernel/ptrace.c                              |  4 ++--
 kernel/signal.c                              | 14 +++++++++-----
 mm/oom_kill.c                                |  4 ++--
 11 files changed, 24 insertions(+), 22 deletions(-)

Eric