1. 27 Sep, 2018 7 commits
  2. 21 Sep, 2018 22 commits
  3. 19 Sep, 2018 7 commits
  4. 16 Sep, 2018 4 commits
    • Eric W. Biederman's avatar
      signal: Pair exports with their functions · fb50f5a4
      Eric W. Biederman authored
      For readability and consistency with the other exports in
      kernel/signal.c pair the exports of signal sending functions with
      their functions, instead of having the exports in one big clump.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      fb50f5a4
    • Eric W. Biederman's avatar
      signal: Remove specific_send_sig_info · b21c5bd5
      Eric W. Biederman authored
      This function is static and it only has two callers.  As
      specific_send_sig_info is only called twice remembering what
      specific_send_sig_info does when reading the code is difficutl and it
      makes it hard to see which sending sending functions are equivalent to
      which others.
      
      So remove specific_send_sig_info to make the code easier to read.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      b21c5bd5
    • Eric W. Biederman's avatar
      signal: Use group_send_sig_info to kill all processes in a pid namespace · 82058d66
      Eric W. Biederman authored
      Replace send_sig_info in zap_pid_ns_processes with
      group_send_sig_info.  This makes more sense as the entire process
      group is being killed.  More importantly this allows the kill of those
      processes with PIDTYPE_MAX to indicate all of the process in the pid
      namespace are being signaled.  This is needed for fork to detect when
      signals are sent to a group of processes.
      
      Admittedly fork has another case to catch SIGKILL but the principle remains
      that it is desirable to know when a group of processes is being signaled.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      82058d66
    • Eric W. Biederman's avatar
      tty_io: Use group_send_sig_info in __do_SACK to note it is a session being killed · a8ebd171
      Eric W. Biederman authored
      Replace send_sig and force_sig in __do_SAK with group_send_sig_info
      the general helper for sending a signal to a process group.  This is
      wordier but it allows specifying PIDTYPE_SID so that the signal code
      knows the signal went to a session.
      
      Both force_sig() and send_sig(..., 1) specify SEND_SIG_PRIV and the
      new call of group_send_sig_info does that explicitly.  This is enough
      to ensure even a pid namespace init is killed.
      
      The global init remains unkillable.  The guarantee that __do_SAK tries
      to provide is a clean path to login to a machine.  As the global init is
      unkillable, if it chooses to hold open a tty it can violate this
      guarantee.  A technique other than killing processes would be needed
      to provide this guarantee to userspace.
      
      The only difference between force_sig and send_sig when sending
      SIGKILL is that SIGNAL_UNKILLABLE is cleared.  This has no affect on
      the processing of a signal sent with SEND_SIG_PRIV by any process, making
      it unnecessary, and not behavior that needs to be preserved.
      
      force_sig was used originally because it did not take as many locks as
      send_sig.  Today send_sig, force_sig and group_send_sig_info take the
      same locks when delivering a signal.
      
      group_send_sig_info also contains a permission check that force_sig
      and send_sig do not.  However the presence of SEND_SIG_PRIV makes the
      permission check a noop.  So the permission check does not result
      in any behavioral differences.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      a8ebd171