Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ptrace_check_attach - check whether ptracee is ready for ptrace operation*@child: ptracee to check for*@ignore_state: don't check whether @child is currently %TASK_TRACED* Check whether @child is being ptraced by %current and ready for further

Proto:static int ptrace_check_attach(struct task_struct *child, bool ignore_state)

Type:int

Parameter:

TypeParameterName
struct task_struct *child
boolignore_state
231  ret = -ESRCH
240  read_lock( & tasklist_lock)
241  If ptrace && Recipient of SIGCHLD, wait4() reports: == current process Then
242  WARN_ON(run state == __TASK_TRACED)
247  If ignore_state || Ensure that nothing can wake it up, even SIGKILL Then ret = 0
250  read_unlock( & tasklist_lock)
252  If Not ret && Not ignore_state Then
253  If Not wait_task_inactive(child, __TASK_TRACED) Then
260  ret = -ESRCH
264  Return ret
Caller
NameDescribe
SYSCALL_DEFINE4
COMPAT_SYSCALL_DEFINE4