函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:SYSCALL_DEFINE4

函数原型:SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr, unsigned long, data)

返回类型:

参数:

1248  如果(request == structs and defines to help the user use the ptrace system call. )则
1249  ret等于ptrace_traceme -- helper for PTRACE_TRACEME* Performs checks and sets PT_PTRACED.* Should be used by all ptrace implementations for PTRACE_TRACEME.
1250  如果非retarch_ptrace_attach(当前进程)
1252  转到:out
1255  child等于d a task by its virtual pid and get the task struct
1256  如果非child
1257  ret等于负ESRCH
1258  转到:out
1261  如果(request == PTRACE_ATTACH || request == PTRACE_SEIZE)则
1262  ret等于ptrace_attach(child, request, addr, data)
1267  如果非retarch_ptrace_attach(child)
1269  转到:out_put_task_struct
1272  ret等于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
1274  如果ret小于0则转到:out_put_task_struct
1277  ret等于arch_ptrace(child, request, addr, data)
1278  如果(ret || request != PTRACE_DETACH)则ptrace_unfreeze_traced(child)
1281  out_put_task_struct :
1282  put_task_struct(child)
1283  out :
1284  返回:ret