Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:COMPAT_SYSCALL_DEFINE4

Proto:COMPAT_SYSCALL_DEFINE4(ptrace, compat_long_t, request, compat_long_t, pid, compat_long_t, addr, compat_long_t, data)

Type:

Parameter:Nothing

1395  If (request == structs and defines to help the user use the ptrace system call. ) Then
1396  ret = ptrace_traceme -- helper for PTRACE_TRACEME* Performs checks and sets PT_PTRACED.* Should be used by all ptrace implementations for PTRACE_TRACEME.
1397  Go to out
1400  child = d a task by its virtual pid and get the task struct
1401  If Not child Then
1402  ret = -ESRCH
1403  Go to out
1406  If (request == PTRACE_ATTACH || request == PTRACE_SEIZE) Then
1407  ret = ptrace_attach(child, request, addr, data)
1412  If Not ret Then arch_ptrace_attach(child)
1414  Go to out_put_task_struct
1417  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
1419  If Not ret Then
1420  ret = compat_arch_ptrace(child, request, addr, data)
1421  If (ret || request != PTRACE_DETACH) Then ptrace_unfreeze_traced(child)
1425  out_put_task_struct :
1426  put_task_struct(child)
1427  out :
1428  Return ret