Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\ptrace.c Create Date:2022-07-28 09:13:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__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

Proto:void __ptrace_unlink(struct task_struct *child)

Type:void

Parameter:

TypeParameterName
struct task_struct *child
118  BUG_ON(!ptrace)
120  clear_tsk_thread_flag(child, syscall trace active )
122  clear_tsk_thread_flag(child, syscall emulation active )
125  Recipient of SIGCHLD, wait4() reports: = Real parent process:
126  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
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  spin_lock( & siglock)
132  ptrace = 0
137  task_clear_jobctl_pending(child, JOBCTL_TRAP_MASK)
138  task_clear_jobctl_trapping(child)
144  If Not ( Per task flags (PF_*), defined further below: & Getting shut down ) && ( Per task flags (PF_*), defined further below: & job control stop in effect || group_stop_count) Then
147  siglock protected |= JOBCTL_STOP_PENDING
156  If Not (siglock protected & signr of the last group stop ) Then siglock protected |= SIGSTOP
166  If siglock protected & JOBCTL_STOP_PENDING || task_is_traced(child) Then ptrace_signal_wake_up(child, true)
169  spin_unlock( & siglock)
Caller
NameDescribe
__ptrace_detachCalled with tasklist_lock held for writing
ptrace_unlink