ptrace.c (0ff555192a8d20385d49d1c420e2e8d409b3c0da) ptrace.c (bf53de907dfdaac178c92d774aae7370d7b97d20)
1/*
2 * linux/kernel/ptrace.c
3 *
4 * (C) Copyright 1999 Linus Torvalds
5 *
6 * Common interfaces for "ptrace()" which we do not want
7 * to continually duplicate across every architecture.
8 */

--- 11 unchanged lines hidden (view full) ---

20#include <linux/signal.h>
21#include <linux/audit.h>
22#include <linux/pid_namespace.h>
23#include <linux/syscalls.h>
24
25#include <asm/pgtable.h>
26#include <asm/uaccess.h>
27
1/*
2 * linux/kernel/ptrace.c
3 *
4 * (C) Copyright 1999 Linus Torvalds
5 *
6 * Common interfaces for "ptrace()" which we do not want
7 * to continually duplicate across every architecture.
8 */

--- 11 unchanged lines hidden (view full) ---

20#include <linux/signal.h>
21#include <linux/audit.h>
22#include <linux/pid_namespace.h>
23#include <linux/syscalls.h>
24
25#include <asm/pgtable.h>
26#include <asm/uaccess.h>
27
28
28/*
29/*
30 * Initialize a new task whose father had been ptraced.
31 *
32 * Called from copy_process().
33 */
34void ptrace_fork(struct task_struct *child, unsigned long clone_flags)
35{
36 arch_ptrace_fork(child, clone_flags);
37}
38
39/*
29 * ptrace a task: make the debugger its new parent and
30 * move it to the ptrace list.
31 *
32 * Must be called with the tasklist lock write-held.
33 */
34void __ptrace_link(struct task_struct *child, struct task_struct *new_parent)
35{
36 BUG_ON(!list_empty(&child->ptrace_entry));

--- 30 unchanged lines hidden (view full) ---

67void __ptrace_unlink(struct task_struct *child)
68{
69 BUG_ON(!child->ptrace);
70
71 child->ptrace = 0;
72 child->parent = child->real_parent;
73 list_del_init(&child->ptrace_entry);
74
40 * ptrace a task: make the debugger its new parent and
41 * move it to the ptrace list.
42 *
43 * Must be called with the tasklist lock write-held.
44 */
45void __ptrace_link(struct task_struct *child, struct task_struct *new_parent)
46{
47 BUG_ON(!list_empty(&child->ptrace_entry));

--- 30 unchanged lines hidden (view full) ---

78void __ptrace_unlink(struct task_struct *child)
79{
80 BUG_ON(!child->ptrace);
81
82 child->ptrace = 0;
83 child->parent = child->real_parent;
84 list_del_init(&child->ptrace_entry);
85
86 arch_ptrace_untrace(child);
75 if (task_is_traced(child))
76 ptrace_untrace(child);
77}
78
79/*
80 * Check that we have indeed attached to the thing..
81 */
82int ptrace_check_attach(struct task_struct *child, int kill)

--- 630 unchanged lines hidden ---
87 if (task_is_traced(child))
88 ptrace_untrace(child);
89}
90
91/*
92 * Check that we have indeed attached to the thing..
93 */
94int ptrace_check_attach(struct task_struct *child, int kill)

--- 630 unchanged lines hidden ---