Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ptrace_readdata

Proto:int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len)

Type:int

Parameter:

TypeParameterName
struct task_struct *tsk
unsigned longsrc
char __user *dst
intlen
595  copied = 0
597  When len > 0 cycle
601  this_len = If len > size of buf Then size of buf Else len
602  retval = 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
604  If Not retval Then
605  If copied Then Break
607  Return -EIO
609  If copy_to_user(dst, buf, retval) Then Return -EFAULT
611  copied += retval
612  src += retval
613  dst += retval
614  len -= retval
616  Return copied