Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, unsigned int gup_flags)

Type:int

Parameter:

TypeParameterName
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  If Not mm Then Return 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  Return ret
Caller
NameDescribe
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.