函数逻辑报告 |
Source Code:mm\mremap.c |
Create Date:2022-07-27 16:22:06 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:move_vma
函数原型:static unsigned long move_vma(struct vm_area_struct *vma, unsigned long old_addr, unsigned long old_len, unsigned long new_len, unsigned long new_addr, bool *locked, struct vm_userfaultfd_ctx *uf, struct list_head *uf_unmap)
返回类型:unsigned long
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct vm_area_struct * | vma | |
| unsigned long | old_addr | |
| unsigned long | old_len | |
| unsigned long | new_len | |
| unsigned long | new_addr | |
| bool * | locked | |
| struct vm_userfaultfd_ctx * | uf | |
| struct list_head * | uf_unmap |
| 326 | vm_flags等于Flags, see mm.h. |
| 329 | excess等于0 |
| 331 | split等于0 |
| 339 | 如果 number of VMAs 大于等于sysctl_max_map_count减3则返回:负ENOMEM |
| 349 | err等于ksm_madvise(vma, old_addr, old_addr + old_len, KSM may not merge identical pages , & vm_flags) |
| 354 | new_pgoff等于Offset (within vm_file) in PAGE_SIZEunits 加old_addr减Our start address within vm_mm. 右移PAGE_SHIFT determines the page size 位的值 |
| 355 | new_vma等于Copy the vma structure to a new location in the same mm,* prior to moving page table entries, to effect an mremap move. |
| 368 | 如果此条件成立可能性小(为编译器优化)(err)则 |
| 380 | 否则 |
| 381 | mremap_userfaultfd_prep(new_vma, uf) |
| 387 | 如果vm_flags按位与Is a VM accounted object 则 |
| 388 | Flags, see mm.h. 与等于Is a VM accounted object 的反 |
| 408 | 如果此条件成立可能性小(为编译器优化)(Flags, see mm.h. & Page-ranges managed without "struct page", just pure PFN )则untrack_pfn_moved(vma) |
| 414 | excess等于0 |
| 419 | 如果excess则 |
| 427 | * locked = true |
| 430 | 返回:new_addr |
| 名称 | 描述 |
|---|---|
| mremap_to | |
| SYSCALL_DEFINE5 | Expand (or shrink) an existing mapping, potentially moving it at the* same time (controlled by the MREMAP_MAYMOVE flag and available VM space)* MREMAP_FIXED option added 5-Dec-1999 by Benjamin LaHaise* This option implies MREMAP_MAYMOVE. |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |