diff options
author | James Morris <james.l.morris@oracle.com> | 2017-07-25 03:44:18 +0300 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-07-25 03:44:18 +0300 |
commit | 53a2ebaaabc1eb8458796fec3bc1e0e80746b642 (patch) | |
tree | 9d1f9227b49392cdd2edcc01057517da4f4b09c2 /include/linux/ptrace.h | |
parent | 3cf29931453215536916d0c4da953fce1911ced3 (diff) | |
parent | 520eccdfe187591a51ea9ab4c1a024ae4d0f68d9 (diff) | |
download | linux-53a2ebaaabc1eb8458796fec3bc1e0e80746b642.tar.xz |
sync to Linus v4.13-rc2 for subsystem developers to work against
Diffstat (limited to 'include/linux/ptrace.h')
-rw-r--r-- | include/linux/ptrace.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 422bc2e4cb6a..0e5fcc11b1b8 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h @@ -54,7 +54,8 @@ extern int ptrace_request(struct task_struct *child, long request, unsigned long addr, unsigned long data); extern void ptrace_notify(int exit_code); extern void __ptrace_link(struct task_struct *child, - struct task_struct *new_parent); + struct task_struct *new_parent, + const struct cred *ptracer_cred); extern void __ptrace_unlink(struct task_struct *child); extern void exit_ptrace(struct task_struct *tracer, struct list_head *dead); #define PTRACE_MODE_READ 0x01 @@ -206,7 +207,7 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace) if (unlikely(ptrace) && current->ptrace) { child->ptrace = current->ptrace; - __ptrace_link(child, current->parent); + __ptrace_link(child, current->parent, current->ptracer_cred); if (child->ptrace & PT_SEIZED) task_set_jobctl_pending(child, JOBCTL_TRAP_STOP); @@ -215,6 +216,8 @@ static inline void ptrace_init_task(struct task_struct *child, bool ptrace) set_tsk_thread_flag(child, TIF_SIGPENDING); } + else + child->ptracer_cred = NULL; } /** @@ -388,10 +391,6 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, #define current_pt_regs() task_pt_regs(current) #endif -#ifndef ptrace_signal_deliver -#define ptrace_signal_deliver() ((void)0) -#endif - /* * unlike current_pt_regs(), this one is equal to task_pt_regs(current) * on *all* architectures; the only reason to have a per-arch definition |