Function report |
Source Code:mm\process_vm_access.c |
Create Date:2022-07-28 15:01:21 |
Last Modify:2020-03-17 21:52:24 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:process_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*
Proto:static int process_vm_rw_single_vec(unsigned long addr, unsigned long len, struct iov_iter *iter, struct page **process_pages, struct mm_struct *mm, struct task_struct *task, int vm_write)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned long | addr | |
unsigned long | len | |
struct iov_iter * | iter | |
struct page ** | process_pages | |
struct mm_struct * | mm | |
struct task_struct * | task | |
int | vm_write |
83 | start_offset = addr - pa |
85 | rc = 0 |
86 | max_pages_per_loop = Maximum number of pages kmalloc'd to hold struct page's during copy / sizeof(structpages * ) |
88 | flags = 0 |
91 | If len == 0 Then Return 0 |
95 | If vm_write Then flags |= check pte is writable |
98 | When Not rc && nr_pages && iov_iter_count(iter) cycle |
99 | pages = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(nr_pages, max_pages_per_loop) |
100 | locked = 1 |
108 | lock for reading |
109 | pages = get_user_pages_remote() - pin user pages in memory*@tsk: the task_struct to use for page fault accounting, or* NULL if faults are not to be recorded |
111 | If locked Then lease a read lock |
116 | bytes = pages * PAGE_SIZE - start_offset |
124 | start_offset = 0 |
128 | put_page(process_pages[--pages]) |
131 | Return rc |
Name | Describe |
---|---|
process_vm_rw_core | 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 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |