Function report |
Source Code:mm\process_vm_access.c |
Create Date:2022-07-28 15:01:28 |
| 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_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
Proto:static ssize_t process_vm_rw_core(pid_t pid, struct iov_iter *iter, const struct iovec *rvec, unsigned long riovcnt, unsigned long flags, int vm_write)
Type:ssize_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| pid_t | pid | |
| struct iov_iter * | iter | |
| const struct iovec * | rvec | |
| unsigned long | riovcnt | |
| unsigned long | flags | |
| int | vm_write |
| 158 | process_pages = pp_stack |
| 161 | rc = 0 |
| 162 | nr_pages = 0 |
| 165 | total_len = iov_iter_count(iter) |
| 173 | If iov_len > 0 Then |
| 182 | If nr_pages == 0 Then Return 0 |
| 192 | If Not process_pages Then Return -ENOMEM |
| 197 | task = find_get_task_by_vpid(pid) |
| 198 | If Not task Then |
| 200 | Go to free_proc_pages |
| 203 | mm = mm_access(task, PTRACE_MODE_ATTACH_REALCREDS) |
| 212 | Go to put_task_struct |
| 221 | total_len -= iov_iter_count(iter) |
| 231 | put_task_struct : |
| 232 | put_task_struct(task) |
| 234 | free_proc_pages : |
| 235 | If process_pages != pp_stack Then kfree(process_pages) |
| 237 | Return rc |
| Name | Describe |
|---|---|
| process_vm_rw | 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 |
| compat_process_vm_rw |
| 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 |