Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:compat_ptrace_request

Proto:int compat_ptrace_request(struct task_struct *child, compat_long_t request, compat_ulong_t addr, compat_ulong_t data)

Type:int

Parameter:

TypeParameterName
struct task_struct *child
compat_long_trequest
compat_ulong_taddr
compat_ulong_tdata
1314  __user * datap = A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already.
1320  Case request == PTRACE_PEEKTEXT
1321  Case request == PTRACE_PEEKDATA
1322  ret = Access another process' address space via ptrace.* Source/target buffer must be kernel space,* Do not walk the page table directly, use get_user_pages
1324  If ret != size of word Then ret = -EIO
1326  Else ret = Write a simple value into user space(word, datap)
1328  Break
1330  Case request == PTRACE_POKETEXT
1331  Case request == PTRACE_POKEDATA
1332  ret = Access another process' address space via ptrace.* Source/target buffer must be kernel space,* Do not walk the page table directly, use get_user_pages
1334  ret = If ret != size of data Then -EIO Else 0
1335  Break
1337  Case request == PTRACE_GETEVENTMSG
1338  ret = Write a simple value into user space((compat_ulong_t) Ptrace state: , datap)
1339  Break
1341  Case request == PTRACE_GETSIGINFO
1342  ret = ptrace_getsiginfo(child, & siginfo)
1343  If Not ret Then ret = copy_siginfo_to_user32((structcompat_siginfo__user * )datap, & siginfo)
1347  Break
1349  Case request == PTRACE_SETSIGINFO
1350  ret = copy_siginfo_from_user32( & siginfo, (structcompat_siginfo__user * )datap)
1352  If Not ret Then ret = ptrace_setsiginfo(child, & siginfo)
1354  Break
1382  Default
1383  ret = ptrace_request(child, request, addr, data)
1386  Return ret