Function report |
Source Code:mm\nommu.c |
Create Date:2022-07-28 14:38:06 |
| Last Modify:2020-03-17 21:26:27 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__access_remote_vm
Proto:int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, unsigned long addr, void *buf, int len, unsigned int gup_flags)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct task_struct * | tsk | |
| struct mm_struct * | mm | |
| unsigned long | addr | |
| void * | buf | |
| int | len | |
| unsigned int | gup_flags |
| 1712 | write = gup_flags & check pte is writable |
| 1714 | If down_read_killable( & mmap_sem) Then Return 0 |
| 1719 | If vma Then |
| 1721 | If addr + len >= The first byte after our end addresswithin vm_mm. Then len = The first byte after our end addresswithin vm_mm. - addr |
| 1725 | If write && Flags, see mm.h. & VM_MAYWRITE Then copy_to_user_page(vma, NULL, addr, (void * )addr, buf, len) |
| 1728 | Else if Not write && Flags, see mm.h. & limits for mprotect() etc Then copy_from_user_page(vma, NULL, addr, buf, (void * )addr, len) |
| 1731 | Else len = 0 |
| 1733 | Else |
| 1734 | len = 0 |
| 1737 | lease a read lock |
| 1739 | Return len |
| Name | Describe |
|---|---|
| access_remote_vm | access_remote_vm - access another process' address space*@mm: the mm_struct of the target address space*@addr: start address to access*@buf: source or destination buffer*@len: number of bytes to transfer*@gup_flags: flags modifying lookup behaviour |
| access_process_vm | Access another process' address space.* - source/target buffer must be kernel space |
| 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 |