函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:int ptrace_access_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, unsigned int gup_flags)

返回类型:int

参数:

类型参数名称
struct task_struct *tsk
unsigned longaddr
void *buf
intlen
unsigned intgup_flags
48  mm等于get_task_mm - acquire a reference to the task's mm* Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning* this kernel workthread has transiently adopted a user mm with use_mm,* to do its AIO) is not set and if so returns a reference to it, after
49  如果非mm则返回:0
52  如果非ptrace当前进程不等于 Recipient of SIGCHLD, wait4() reports: get_dumpable(mm)不等于Dump as user of process 且非ptracer_capable - Determine if the ptracer holds CAP_SYS_PTRACE in the namespace*@tsk: The task that may be ptraced*@ns: The user namespace to search for CAP_SYS_PTRACE in* Return true if the task that is ptracing the current task had CAP_SYS_PTRACE
56  Decrement the use count and release all resources for an mm.
57  返回:0
60  ret等于__access_remote_vm(tsk, mm, addr, buf, len, gup_flags)
61  Decrement the use count and release all resources for an mm.
63  返回:ret
调用者
名称描述
ptrace_readdata
ptrace_writedata
generic_ptrace_peekdata
generic_ptrace_pokedata
compat_ptrace_request