函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\ptrace.c Create Date:2022-07-27 10:13:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__ptrace_unlink - unlink ptracee and restore its execution state*@child: ptracee to be unlinked* Remove @child from the ptrace list, move it back to the original parent,* and restore the execution state so that it conforms to the group stop* state

函数原型:void __ptrace_unlink(struct task_struct *child)

返回类型:void

参数:

类型参数名称
struct task_struct *child
118  BUG_ON(!ptrace)
120  清除线程指定标志
122  清除线程指定标志
125  Recipient of SIGCHLD, wait4() reports: 等于真正的父进程
126  删除链表项并重新初始化
127  old_cred等于 Tracer's credentials at attach:
128  Tracer's credentials at attach: = NULL
129  put_cred - Release a reference to a set of credentials*@cred: The credentials to release* Release a reference to a set of credentials, deleting them when the last ref* is released
131  加自旋锁
132  ptrace等于0
137  task_clear_jobctl_pending(child, JOBCTL_TRAP_MASK)
138  task_clear_jobctl_trapping(child)
144  如果非任务标志按位与Getting shut down 的值且任务标志按位与job control stop in effect group_stop_count的值则
147  JOBCTL_*, siglock protected: 或等于JOBCTL_STOP_PENDING
156  如果非 JOBCTL_*, siglock protected: 按位与signr of the last group stop 的值则 JOBCTL_*, siglock protected: 或等于SIGSTOP
166  如果 JOBCTL_*, siglock protected: 按位与JOBCTL_STOP_PENDINGtask_is_traced(child)则ptrace_signal_wake_up(child, true)
169  自旋锁解锁
调用者
名称描述
__ptrace_detachCalled with tasklist_lock held for writing
ptrace_unlink