函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\process_vm_access.c Create Date:2022-07-27 16:31:27
Last Modify:2020-03-17 21:52:24 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:process_vm_rw - check iovecs before calling core routine*@pid: PID of process to read/write from/to*@lvec: iovec array specifying where to copy to/from locally*@liovcnt: size of lvec array*@rvec: iovec array specifying where to copy to/from in the other

函数原型:static ssize_t process_vm_rw(pid_t pid, const struct iovec __user *lvec, unsigned long liovcnt, const struct iovec __user *rvec, unsigned long riovcnt, unsigned long flags, int vm_write)

返回类型:ssize_t

参数:

类型参数名称
pid_tpid
const struct iovec __user *lvec
unsigned longliovcnt
const struct iovec __user *rvec
unsigned longriovcnt
unsigned longflags
intvm_write
263  iov_l等于iovstack_l
264  iov_r等于iovstack_r
267  dir等于如果vm_writeWRITE否则generic data direction definitions
269  如果flags不等于0则返回:负EINVAL
273  rc等于mport_iovec() - Copy an array of &struct iovec from userspace* into the kernel, check that it is valid, and initialize a new* &struct iov_iter iterator to access it.*@type: One of %READ or %WRITE.*@uvector: Pointer to the userspace array.
274  如果rc小于0则返回:rc
276  如果非iov_iter_count( & iter)则转到:free_iovecs
279  rc等于rw_copy_check_uvector(Flag for rw_copy_check_uvector and compat_rw_copy_check_uvector* that indicates that they should check the contents of the iovec are* valid, but not check the memory that the iovec elements* points too., rvec, riovcnt, UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1), iovstack_r, & iov_r)
281  如果rc小于等于0则转到:free_iovecs
284  rc等于process_vm_rw_core - core of reading/writing pages from task specified*@pid: PID of process to read/write from/to*@iter: where to copy to/from locally*@rvec: iovec array specifying where to copy to/from in the other process*@riovcnt: size of rvec
286  free_iovecs :
287  如果iov_r不等于iovstack_r释放内存
289  释放内存
291  返回:rc
调用者
名称描述
SYSCALL_DEFINE6
SYSCALL_DEFINE6