diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/tracehook.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 6468ca0fe69b..e113e09b0341 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -52,6 +52,21 @@ | |||
52 | struct linux_binprm; | 52 | struct linux_binprm; |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * tracehook_expect_breakpoints - guess if task memory might be touched | ||
56 | * @task: current task, making a new mapping | ||
57 | * | ||
58 | * Return nonzero if @task is expected to want breakpoint insertion in | ||
59 | * its memory at some point. A zero return is no guarantee it won't | ||
60 | * be done, but this is a hint that it's known to be likely. | ||
61 | * | ||
62 | * May be called with @task->mm->mmap_sem held for writing. | ||
63 | */ | ||
64 | static inline int tracehook_expect_breakpoints(struct task_struct *task) | ||
65 | { | ||
66 | return (task_ptrace(task) & PT_PTRACED) != 0; | ||
67 | } | ||
68 | |||
69 | /** | ||
55 | * tracehook_unsafe_exec - check for exec declared unsafe due to tracing | 70 | * tracehook_unsafe_exec - check for exec declared unsafe due to tracing |
56 | * @task: current task doing exec | 71 | * @task: current task doing exec |
57 | * | 72 | * |