06 Nov, 2015

1 commit

  • Currently, try_charge() tries to reclaim memory synchronously when the
    high limit is breached; however, if the allocation doesn't have
    __GFP_WAIT, synchronous reclaim is skipped. If a process performs only
    speculative allocations, it can blow way past the high limit. This is
    actually easily reproducible by simply doing "find /". slab/slub
    allocator tries speculative allocations first, so as long as there's
    memory which can be consumed without blocking, it can keep allocating
    memory regardless of the high limit.

    This patch makes try_charge() always punt the over-high reclaim to the
    return-to-userland path. If try_charge() detects that high limit is
    breached, it adds the overage to current->memcg_nr_pages_over_high and
    schedules execution of mem_cgroup_handle_over_high() which performs
    synchronous reclaim from the return-to-userland path.

    As long as kernel doesn't have a run-away allocation spree, this should
    provide enough protection while making kmemcg behave more consistently.
    It also has the following benefits.

    - All over-high reclaims can use GFP_KERNEL regardless of the specific
    gfp mask in use, e.g. GFP_NOFS, when the limit was breached.

    - It copes with prio inversion. Previously, a low-prio task with
    small memory.high might perform over-high reclaim with a bunch of
    locks held. If a higher prio task needed any of these locks, it
    would have to wait until the low prio task finished reclaim and
    released the locks. By handing over-high reclaim to the task exit
    path this issue can be avoided.

    Signed-off-by: Tejun Heo
    Acked-by: Michal Hocko
    Reviewed-by: Vladimir Davydov
    Acked-by: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

06 Aug, 2014

1 commit


18 Apr, 2014

1 commit

  • Mostly scripted conversion of the smp_mb__* barriers.

    Signed-off-by: Peter Zijlstra
    Acked-by: Paul E. McKenney
    Link: http://lkml.kernel.org/n/tip-55dhyhocezdw1dg7u19hmh1u@git.kernel.org
    Cc: Linus Torvalds
    Cc: linux-arch@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

23 Jul, 2012

1 commit

  • layout based on Oleg's suggestion; single-linked list,
    task->task_works points to the last element, forward pointer
    from said last element points to head. I'd still prefer
    much more regular scheme with two pointers in task_work,
    but...

    Signed-off-by: Al Viro

    Al Viro
     

24 May, 2012

4 commits

  • After the previouse change key_replace_session_keyring() becomes a nop.
    Remove the dummy definition in key.h and update the callers in
    arch/*/kernel/signal.c.

    Signed-off-by: Oleg Nesterov
    Acked-by: David Howells
    Cc: Thomas Gleixner
    Cc: Richard Kuo
    Cc: Linus Torvalds
    Cc: Alexander Gordeev
    Cc: Chris Zankel
    Cc: David Smith
    Cc: "Frank Ch. Eigler"
    Cc: Geert Uytterhoeven
    Cc: Larry Woodman
    Cc: Peter Zijlstra
    Cc: Tejun Heo
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Oleg Nesterov
     
  • Provide a simple mechanism that allows running code in the (nonatomic)
    context of the arbitrary task.

    The caller does task_work_add(task, task_work) and this task executes
    task_work->func() either from do_notify_resume() or from do_exit(). The
    callback can rely on PF_EXITING to detect the latter case.

    "struct task_work" can be embedded in another struct, still it has "void
    *data" to handle the most common/simple case.

    This allows us to kill the ->replacement_session_keyring hack, and
    potentially this can have more users.

    Performance-wise, this adds 2 "unlikely(!hlist_empty())" checks into
    tracehook_notify_resume() and do_exit(). But at the same time we can
    remove the "replacement_session_keyring != NULL" checks from
    arch/*/signal.c and exit_creds().

    Note: task_work_add/task_work_run abuses ->pi_lock. This is only because
    this lock is already used by lookup_pi_state() to synchronize with
    do_exit() setting PF_EXITING. Fortunately the scope of this lock in
    task_work.c is really tiny, and the code is unlikely anyway.

    Signed-off-by: Oleg Nesterov
    Acked-by: David Howells
    Cc: Thomas Gleixner
    Cc: Richard Kuo
    Cc: Linus Torvalds
    Cc: Alexander Gordeev
    Cc: Chris Zankel
    Cc: David Smith
    Cc: "Frank Ch. Eigler"
    Cc: Geert Uytterhoeven
    Cc: Larry Woodman
    Cc: Peter Zijlstra
    Cc: Tejun Heo
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Oleg Nesterov
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     

24 Mar, 2012

1 commit

  • Another old/known problem. If the tracee is killed after it reports
    syscall_entry, it starts the syscall and debugger can't control this.
    This confuses the users and this creates the security problems for
    ptrace jailers.

    Change tracehook_report_syscall_entry() to return non-zero if killed,
    this instructs syscall_trace_enter() to abort the syscall.

    Reported-by: Chris Evans
    Tested-by: Indan Zupancic
    Signed-off-by: Oleg Nesterov
    Cc: Denys Vlasenko
    Cc: Tejun Heo
    Cc: Pedro Alves
    Cc: Jan Kratochvil
    Cc: Steven Rostedt
    Cc: Frederic Weisbecker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

28 Jun, 2011

1 commit

  • Kill tracehook_notify_death(), reimplement the logic in its caller,
    exit_notify().

    Also, change the exec_id's check to use thread_group_leader() instead
    of task_detached(), this is more clear. This logic only applies to
    the exiting leader, a sub-thread must never change its exit_signal.

    Note: when the traced group leader exits the exit_signal-or-SIGCHLD
    logic looks really strange:

    - we notify the tracer even if !thread_group_empty() but
    do_wait(WEXITED) can't work until all threads exit

    - if the tracer is real_parent, it is not clear why can't
    we use ->exit_signal event if !thread_group_empty()

    -v2: do not try to fix the 2nd oddity to avoid the subtle behavior
    change mixed with reorganization, suggested by Tejun.

    Signed-off-by: Oleg Nesterov
    Reviewed-by: Tejun Heo

    Oleg Nesterov
     

23 Jun, 2011

6 commits

  • tracehook.h is on the way out. Rename tracehook_tracer_task() to
    ptrace_parent() and move it from tracehook.h to ptrace.h.

    Signed-off-by: Tejun Heo
    Cc: Christoph Hellwig
    Cc: John Johansen
    Cc: Stephen Smalley
    Signed-off-by: Oleg Nesterov

    Tejun Heo
     
  • At this point, tracehooks aren't useful to mainline kernel and mostly
    just add an extra layer of obfuscation. Although they have comments,
    without actual in-kernel users, it is difficult to tell what are their
    assumptions and they're actually trying to achieve. To mainline
    kernel, they just aren't worth keeping around.

    This patch kills the following clone and exec related tracehooks.

    tracehook_prepare_clone()
    tracehook_finish_clone()
    tracehook_report_clone()
    tracehook_report_clone_complete()
    tracehook_unsafe_exec()

    The changes are mostly trivial - logic is moved to the caller and
    comments are merged and adjusted appropriately.

    The only exception is in check_unsafe_exec() where LSM_UNSAFE_PTRACE*
    are OR'd to bprm->unsafe instead of setting it, which produces the
    same result as the field is always zero on entry. It also tests
    p->ptrace instead of (p->ptrace & PT_PTRACED) for consistency, which
    also gives the same result.

    This doesn't introduce any behavior change.

    Signed-off-by: Tejun Heo
    Cc: Christoph Hellwig
    Signed-off-by: Oleg Nesterov

    Tejun Heo
     
  • At this point, tracehooks aren't useful to mainline kernel and mostly
    just add an extra layer of obfuscation. Although they have comments,
    without actual in-kernel users, it is difficult to tell what are their
    assumptions and they're actually trying to achieve. To mainline
    kernel, they just aren't worth keeping around.

    This patch kills the following trivial tracehooks.

    * Ones testing whether task is ptraced. Replace with ->ptrace test.

    tracehook_expect_breakpoints()
    tracehook_consider_ignored_signal()
    tracehook_consider_fatal_signal()

    * ptrace_event() wrappers. Call directly.

    tracehook_report_exec()
    tracehook_report_exit()
    tracehook_report_vfork_done()

    * ptrace_release_task() wrapper. Call directly.

    tracehook_finish_release_task()

    * noop

    tracehook_prepare_release_task()
    tracehook_report_death()

    This doesn't introduce any behavior change.

    Signed-off-by: Tejun Heo
    Cc: Christoph Hellwig
    Cc: Martin Schwidefsky
    Signed-off-by: Oleg Nesterov

    Tejun Heo
     
  • Move SIGTRAP on exec(2) logic from tracehook_report_exec() to
    ptrace_event(). This is part of changes to make ptrace_event()
    smarter and handle ptrace event related details in one place.

    This doesn't introduce any behavior change.

    Signed-off-by: Tejun Heo
    Signed-off-by: Oleg Nesterov

    Tejun Heo
     
  • This patch implements ptrace_event_enabled() which tests whether a
    given PTRACE_EVENT_* is enabled and use it to simplify ptrace_event()
    and tracehook_prepare_clone().

    PT_EVENT_FLAG() macro is added which calculates PT_TRACE_* flag from
    PTRACE_EVENT_*. This is used to define PT_TRACE_* flags and by
    ptrace_event_enabled() to find the matching flag.

    This is used to make ptrace_event() and tracehook_prepare_clone()
    simpler.

    * ptrace_event() callers were responsible for providing mask to test
    whether the event was enabled. This patch implements
    ptrace_event_enabled() and make ptrace_event() drop @mask and
    determine whether the event is enabled from @event. Note that
    @event is constant and this conversion doesn't add runtime overhead.

    All conversions except tracehook_report_clone_complete() are
    trivial. tracehook_report_clone_complete() used to use 0 for @mask
    (always enabled) but now tests whether the specified event is
    enabled. This doesn't cause any behavior difference as it's
    guaranteed that the event specified by @trace is enabled.

    * tracehook_prepare_clone() now only determines which event is
    applicable and use ptrace_event_enabled() for enable test.

    This doesn't introduce any behavior change.

    Signed-off-by: Tejun Heo
    Signed-off-by: Oleg Nesterov

    Tejun Heo
     
  • task_ptrace(task) simply dereferences task->ptrace and isn't even used
    consistently only adding confusion. Kill it and directly access
    ->ptrace instead.

    This doesn't introduce any behavior change.

    Signed-off-by: Tejun Heo
    Signed-off-by: Oleg Nesterov

    Tejun Heo
     

05 Jun, 2011

1 commit

  • Remove the following three noop tracehooks in signals.c.

    * tracehook_force_sigpending()
    * tracehook_get_signal()
    * tracehook_finish_jctl()

    The code area is about to be updated and these hooks don't do anything
    other than obfuscating the logic.

    Signed-off-by: Tejun Heo
    Signed-off-by: Oleg Nesterov

    Tejun Heo
     

21 May, 2011

1 commit

  • * 'ptrace' of git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc: (41 commits)
    signal: trivial, fix the "timespec declared inside parameter list" warning
    job control: reorganize wait_task_stopped()
    ptrace: fix signal->wait_chldexit usage in task_clear_group_stop_trapping()
    signal: sys_sigprocmask() needs retarget_shared_pending()
    signal: cleanup sys_sigprocmask()
    signal: rename signandsets() to sigandnsets()
    signal: do_sigtimedwait() needs retarget_shared_pending()
    signal: introduce do_sigtimedwait() to factor out compat/native code
    signal: sys_rt_sigtimedwait: simplify the timeout logic
    signal: cleanup sys_rt_sigprocmask()
    x86: signal: sys_rt_sigreturn() should use set_current_blocked()
    x86: signal: handle_signal() should use set_current_blocked()
    signal: sigprocmask() should do retarget_shared_pending()
    signal: sigprocmask: narrow the scope of ->siglock
    signal: retarget_shared_pending: optimize while_each_thread() loop
    signal: retarget_shared_pending: consider shared/unblocked signals only
    signal: introduce retarget_shared_pending()
    ptrace: ptrace_check_attach() should not do s/STOPPED/TRACED/
    signal: Turn SIGNAL_STOP_DEQUEUED into GROUP_STOP_DEQUEUED
    signal: do_signal_stop: Remove the unneeded task_clear_group_stop_pending()
    ...

    Linus Torvalds
     

31 Mar, 2011

1 commit


23 Mar, 2011

1 commit

  • tracehook_notify_jctl() aids in determining whether and what to report
    to the parent when a task is stopped or continued. The function also
    adds an extra requirement that siglock may be released across it,
    which is currently unused and quite difficult to satisfy in
    well-defined manner.

    As job control and the notifications are about to receive major
    overhaul, remove the tracehook and open code it. If ever necessary,
    let's factor it out after the overhaul.

    * Oleg spotted incorrect CLD_CONTINUED/STOPPED selection when ptraced.
    Fixed.

    Signed-off-by: Tejun Heo
    Cc: Oleg Nesterov
    Cc: Roland McGrath

    Tejun Heo
     

28 Oct, 2010

1 commit

  • Oleg Nesterov pointed out we have to prevent multiple-threads-inside-exec
    itself and we can reuse ->cred_guard_mutex for it. Yes, concurrent
    execve() has no worth.

    Let's move ->cred_guard_mutex from task_struct to signal_struct. It
    naturally prevent multiple-threads-inside-exec.

    Signed-off-by: KOSAKI Motohiro
    Reviewed-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     

16 Dec, 2009

1 commit

  • Suggested by Roland.

    Change tracehook_report_syscall_exit() to look at step flag and send the
    trap signal if needed.

    This change affects ia64, microblaze, parisc, powerpc, sh. They pass
    nonzero "step" argument to tracehook but since it was ignored the tracee
    reports via ptrace_notify(), this is not right and not consistent.

    - PTRACE_SETSIGINFO doesn't work

    - if the tracer resumes the tracee with signr != 0 the new signal
    is generated rather than delivering it

    - If PT_TRACESYSGOOD is set the tracee reports the wrong exit_code

    I don't have a powerpc machine, but I think this test-case should see the
    difference:

    #include
    #include
    #include
    #include
    #include

    int main(void)
    {
    int pid, status;

    if (!(pid = fork())) {
    assert(ptrace(PTRACE_TRACEME) == 0);
    kill(getpid(), SIGSTOP);

    getppid();

    return 0;
    }

    assert(pid == wait(&status));
    assert(ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_TRACESYSGOOD) == 0);

    assert(ptrace(PTRACE_SYSCALL, pid, 0,0) == 0);
    assert(pid == wait(&status));

    assert(ptrace(PTRACE_SINGLESTEP, pid, 0,0) == 0);
    assert(pid == wait(&status));

    if (status == 0x57F)
    return 0;

    printf("kernel bug: status=%X shouldn't have 0x80\n", status);
    return 1;
    }

    Signed-off-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Cc:
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

24 Sep, 2009

1 commit

  • This changes tracehook_notify_jctl() so it's called with the siglock held,
    and changes its argument and return value definition. These clean-ups
    make it a better fit for what new tracing hooks need to check.

    Tracing needs the siglock here, held from the time TASK_STOPPED was set,
    to avoid potential SIGCONT races if it wants to allow any blocking in its
    tracing hooks.

    This also folds the finish_stop() function into its caller
    do_signal_stop(). The function is short, called only once and only
    unconditionally. It aids readability to fold it in.

    [oleg@redhat.com: do not call tracehook_notify_jctl() in TASK_STOPPED state]
    [oleg@redhat.com: introduce tracehook_finish_jctl() helper]
    Signed-off-by: Roland McGrath
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     

19 Jun, 2009

1 commit


05 Jun, 2009

1 commit

  • The "trace || CLONE_PTRACE" check in tracehook_report_clone() is not right,

    - If the untraced task does clone(CLONE_PTRACE) the new child is not traced,
    we must not queue SIGSTOP.

    - If we forked the traced task, but the tracer exits and untraces both the
    forking task and the new child (after copy_process() drops tasklist_lock),
    we should not queue SIGSTOP too.

    Change the code to check task_ptrace() != 0 instead. This is still racy, but
    the race is harmless.

    We can race with another tracer attaching to this child, or the tracer can
    exit and detach in parallel. But giwen that we didn't do wake_up_new_task()
    yet, the child must have the pending SIGSTOP anyway.

    Signed-off-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

03 Apr, 2009

2 commits

  • 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: Oleg Nesterov
    Cc: "Eric W. Biederman"
    Cc: "Metzger, Markus T"
    Acked-by: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    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: Sukadev Bhattiprolu
    Acked-by: Roland McGrath
    Signed-off-by: Oleg Nesterov
    Cc: "Eric W. Biederman"
    Cc: Daniel Lezcano
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

06 Sep, 2008

1 commit


08 Aug, 2008

1 commit

  • In the change in commit 09a05394fe2448a4139b014936330af23fa7ec83, 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: Eduardo Habkost
    Signed-off-by: Roland McGrath

    Roland McGrath
     

05 Aug, 2008

1 commit

  • My last change to tracehook.h made it confuse the kerneldoc parser.
    Move the #define's before the comment so it's happy again.

    Signed-off-by: Roland McGrath
    Acked-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Roland McGrath
     

02 Aug, 2008

1 commit

  • My commit 2b2a1ff64afbadac842bbc58c5166962cf4f7664 introduced a regression
    (sorry about that) for the odd case of exit_signal=0 (e.g. clone_flags=0).
    This is not a normal use, but it's used by a case in the glibc test suite.

    Dying with exit_signal=0 sends no signal, but it's supposed to wake up a
    parent's blocked wait*() calls (unlike the delayed_group_leader case).
    This fixes tracehook_notify_death() and its caller to distinguish a
    "signal 0" wakeup from the delayed_group_leader case (with no wakeup).

    Signed-off-by: Roland McGrath
    Tested-by: Serge Hallyn
    Signed-off-by: Linus Torvalds

    Roland McGrath
     

27 Jul, 2008

9 commits

  • This fixes some typos and errors in comments.
    No code changes.

    Signed-off-by: Roland McGrath

    Roland McGrath
     
  • This adds asm-generic/syscall.h, which documents what a real
    asm-ARCH/syscall.h file should define. This is not used yet, but will
    provide all the machine-dependent details of examining a user system call
    about to begin, in progress, or just ended.

    Each arch should add an asm-ARCH/syscall.h that defines all the entry
    points documented in asm-generic/syscall.h, as short inlines if possible.
    This lets us write new tracing code that understands user system call
    registers, without any new arch-specific work.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This adds tracehook.h inlines to enable a new arch feature in support of
    user debugging/tracing. This is not used yet, but it lays the groundwork
    for a debugger to be able to wrangle a task that's possibly running,
    without interrupting its syscalls in progress.

    Each arch should define TIF_NOTIFY_RESUME, and in their entry.S code treat
    it much like TIF_SIGPENDING. That is, it causes you to take the slow path
    when returning to user mode, where you get the full user-mode state
    accessible as for signal handling or ptrace. The arch code should check
    TIF_NOTIFY_RESUME after handling TIF_SIGPENDING. When it's set, clear it
    and then call tracehook_notify_resume().

    In future, tracing code will call set_notify_resume() when it wants to get
    a callback in tracehook_notify_resume().

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This defines a new hook tracehook_force_sigpending() that lets tracing
    code decide to force TIF_SIGPENDING on in recalc_sigpending().

    This is not used yet, so it compiles away to nothing for now. It lays the
    groundwork for new tracing code that can interrupt a task synthetically
    without actually sending a signal.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This moves the ptrace logic in task death (exit_notify) into tracehook.h
    inlines. Some code is rearranged slightly to make things nicer. There is
    no change, only cleanup.

    There is one hook called with the tasklist_lock write-locked, as ptrace
    needs. There is also a new hook called after exit_state changes and
    without locks. This is a better place for tracing work to be in the
    future, since it doesn't delay the whole system with locking.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This defines the tracehook_notify_jctl() hook to formalize the ptrace
    effects on the job control notifications. There is no change, only
    cleanup.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This defines the tracehook_get_signal() hook to allow tracing code to slip
    in before normal signal dequeuing. This lays the groundwork for new
    tracing features that can inject synthetic signals outside the normal
    queue or control the disposition of delivered signals. The calling
    convention lets tracehook_get_signal() decide both exactly what will
    happen and what signal number to report in the handler/exit.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This adds standard tracehook.h inlines for arch code to call when
    TIF_SYSCALL_TRACE has been set. This replaces having each arch implement
    the ptrace guts for its syscall tracing support.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This defines tracehook_consider_fatal_signal() has a fine-grained hook for
    deciding to skip the special cases for a fatal signal, as ptrace does.
    There is no change, only cleanup.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath