Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:SYSCALL_DEFINE4

Proto:SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr, unsigned long, data)

Type:

Parameter:Nothing

1248  If (request == structs and defines to help the user use the ptrace system call. ) Then
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  If Not ret Then arch_ptrace_attach(current process)
1252  Go to out
1255  child = d a task by its virtual pid and get the task struct
1256  If Not child Then
1257  ret = -ESRCH
1258  Go to out
1261  If (request == PTRACE_ATTACH || request == PTRACE_SEIZE) Then
1262  ret = ptrace_attach(child, request, addr, data)
1267  If Not ret Then arch_ptrace_attach(child)
1269  Go to 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  If ret < 0 Then Go to out_put_task_struct
1277  ret = arch_ptrace(child, request, addr, data)
1278  If (ret || request != PTRACE_DETACH) Then ptrace_unfreeze_traced(child)
1281  out_put_task_struct :
1282  put_task_struct(child)
1283  out :
1284  Return ret