函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Access another process' address space.* Source/target buffer must be kernel space,* Do not walk the page table directly, use get_user_pages

函数原型:int access_process_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
4554  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
4555  如果非mm则返回:0
4558  ret等于__access_remote_vm(tsk, mm, addr, buf, len, gup_flags)
4560  Decrement the use count and release all resources for an mm.
4562  返回:ret
调用者
名称描述
get_cmdlineget_cmdline() - copy the cmdline value to a buffer.*@task: the task whose cmdline value to copy.*@buffer: the buffer to copy to.*@buflen: the length of the buffer. Larger cmdline values are truncated* to this length.