1. 03 4月, 2009 2 次提交
    • O
      tracehook_notify_death: use task_detached() helper · bb24c679
      Oleg Nesterov 提交于
      Now that task_detached() is exported, change tracehook_notify_death() to
      use this helper, nobody else checks ->exit_signal == -1 by hand.
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: "Metzger, Markus T" <markus.t.metzger@intel.com>
      Acked-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bb24c679
    • O
      signals: remove 'handler' parameter to tracehook functions · 43918f2b
      Oleg Nesterov 提交于
      Container-init must behave like global-init to processes within the
      container and hence it must be immune to unhandled fatal signals from
      within the container (i.e SIG_DFL signals that terminate the process).
      
      But the same container-init must behave like a normal process to processes
      in ancestor namespaces and so if it receives the same fatal signal from a
      process in ancestor namespace, the signal must be processed.
      
      Implementing these semantics requires that send_signal() determine pid
      namespace of the sender but since signals can originate from workqueues/
      interrupt-handlers, determining pid namespace of sender may not always be
      possible or safe.
      
      This patchset implements the design/simplified semantics suggested by
      Oleg Nesterov.  The simplified semantics for container-init are:
      
      	- container-init must never be terminated by a signal from a
      	  descendant process.
      
      	- container-init must never be immune to SIGKILL from an ancestor
      	  namespace (so a process in parent namespace must always be able
      	  to terminate a descendant container).
      
      	- container-init may be immune to unhandled fatal signals (like
      	  SIGUSR1) even if they are from ancestor namespace. SIGKILL/SIGSTOP
      	  are the only reliable signals to a container-init from ancestor
      	  namespace.
      
      This patch:
      
      Based on an earlier patch submitted by Oleg Nesterov and comments from
      Roland McGrath (http://lkml.org/lkml/2008/11/19/258).
      
      The handler parameter is currently unused in the tracehook functions.
      Besides, the tracehook functions are called with siglock held, so the
      functions can check the handler if they later need to.
      
      Removing the parameter simiplifies changes to sig_ignored() in a follow-on
      patch.
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Acked-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Daniel Lezcano <daniel.lezcano@free.fr>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      43918f2b
  2. 06 9月, 2008 1 次提交
  3. 08 8月, 2008 1 次提交
    • R
      tracehook: fix CLONE_PTRACE · 5861bbfc
      Roland McGrath 提交于
      In the change in commit 09a05394, I
      overlooked two nits in the logic and this broke using CLONE_PTRACE
      when PTRACE_O_TRACE* are not being used.
      
      A parent that is itself traced at all but not using PTRACE_O_TRACE*,
      using CLONE_PTRACE would have its new child fail to be traced.
      
      A parent that is not itself traced at all that uses CLONE_PTRACE
      (which should be a no-op in this case) would confuse the bookkeeping
      and lead to a crash at exit time.
      
      This restores the missing checks and fixes both failure modes.
      Reported-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      5861bbfc
  4. 05 8月, 2008 1 次提交
  5. 02 8月, 2008 1 次提交
  6. 27 7月, 2008 19 次提交