函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:static int ptrace_check_attach(struct task_struct *child, bool ignore_state)

返回类型:int

参数:

类型参数名称
struct task_struct *child
boolignore_state
231  ret等于负ESRCH
240  read_lock( & tasklist_lock)
241  如果ptrace Recipient of SIGCHLD, wait4() reports: 恒等于当前进程
242  WARN_ON(任务状态 == __TASK_TRACED)
247  如果ignore_stateEnsure that nothing can wake it up, even SIGKILL ret等于0
250  read_unlock( & tasklist_lock)
252  如果非ret且非ignore_state
253  如果非wait_task_inactive(child, __TASK_TRACED)则
260  ret等于负ESRCH
264  返回:ret
调用者
名称描述
SYSCALL_DEFINE4
COMPAT_SYSCALL_DEFINE4