函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:compat_ptrace_request

函数原型:int compat_ptrace_request(struct task_struct *child, compat_long_t request, compat_ulong_t addr, compat_ulong_t data)

返回类型:int

参数:

类型参数名称
struct task_struct *child
compat_long_trequest
compat_ulong_taddr
compat_ulong_tdata
1314  __userdatap等于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  :request恒等于PTRACE_PEEKTEXT
1321  :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  如果ret不等于word的长度则ret等于负EIO
1326  否则ret等于put_user - Write a simple value into user space(word, datap)
1328  退出
1330  :request恒等于PTRACE_POKETEXT
1331  :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等于如果ret不等于data的长度则负EIO否则0
1335  退出
1337  :request恒等于PTRACE_GETEVENTMSG
1338  ret等于put_user - Write a simple value into user space((compat_ulong_t) Ptrace state: , datap)
1339  退出
1341  :request恒等于PTRACE_GETSIGINFO
1342  ret等于ptrace_getsiginfo(child, & siginfo)
1343  如果非retret等于copy_siginfo_to_user32((structcompat_siginfo__user * )datap, & siginfo)
1347  退出
1349  :request恒等于PTRACE_SETSIGINFO
1350  ret等于copy_siginfo_from_user32( & siginfo, (structcompat_siginfo__user * )datap)
1352  如果非retret等于ptrace_setsiginfo(child, & siginfo)
1354  退出
1382  默认
1383  ret等于ptrace_request(child, request, addr, data)
1386  返回:ret