Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ptrace_writedata

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

Type:int

Parameter:

TypeParameterName
struct task_struct *tsk
char __user *src
unsigned longdst
intlen
621  copied = 0
623  When len > 0 cycle
627  this_len = If len > size of buf Then size of buf Else len
628  If copy_from_user(buf, src, this_len) Then Return -EFAULT
630  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
632  If Not retval Then
633  If copied Then Break
635  Return -EIO
637  copied += retval
638  src += retval
639  dst += retval
640  len -= retval
642  Return copied