Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\ptrace.c Create Date:2022-07-28 09:13:06
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 via ptrace.* Source/target buffer must be kernel space,* Do not walk the page table directly, use get_user_pages

Proto:int ptrace_access_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
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  If Not mm Then Return 0
52  If Not ptrace || current process != Recipient of SIGCHLD, wait4() reports: || get_dumpable(mm) != Dump as user of process && Not 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 Then
56  Decrement the use count and release all resources for an mm.
57  Return 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  Return ret
Caller
NameDescribe
ptrace_readdata
ptrace_writedata
generic_ptrace_peekdata
generic_ptrace_pokedata
compat_ptrace_request