函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:process_vm_rw_pages - read/write pages from task specified*@pages: array of pointers to pages we want to copy*@offset: offset in page to start copying from/to*@len: number of bytes to copy*@iter: where to copy to/from locally*@vm_write: 0 means copy from,

函数原型:static int process_vm_rw_pages(struct page **pages, unsigned offset, size_t len, struct iov_iter *iter, int vm_write)

返回类型:int

参数:

类型参数名称
struct page **pages
unsignedoffset
size_tlen
struct iov_iter *iter
intvm_write
37 leniov_iter_count(iter)循环
38  page等于pages自加
39  copy等于PAGE_SIZEoffset
42  如果copy大于lencopy等于len
45  如果vm_write
48  否则
51  len减等于copied
52  如果copied小于copyiov_iter_count(iter)则返回:负EFAULT
54  offset等于0
56  返回:0
调用者
名称描述
process_vm_rw_single_vecprocess_vm_rw_single_vec - read/write pages from task specified*@addr: start memory address of target process*@len: size of area to copy to/from*@iter: where to copy to/from locally*@process_pages: struct pages area that can store at least*