函数逻辑报告 |
Source Code:mm\mmap.c |
Create Date:2022-07-27 16:16:52 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:mmap_region
函数原型:unsigned long mmap_region(struct file *file, unsigned long addr, unsigned long len, vm_flags_t vm_flags, unsigned long pgoff, struct list_head *uf)
返回类型:unsigned long
参数:
类型 | 参数 | 名称 |
---|---|---|
struct file * | file | |
unsigned long | addr | |
unsigned long | len | |
vm_flags_t | vm_flags | |
unsigned long | pgoff | |
struct list_head * | uf |
1697 | charged等于0 |
1726 | 如果security_vm_enough_memory_mm(mm, charged)则返回:负ENOMEM |
1728 | vm_flags或等于Is a VM accounted object |
1734 | vma等于Given a mapping request (addr,end,vm_flags,file,pgoff), figure out* whether that can be merged with its predecessor or its successor |
1744 | vma等于vm_area_alloc(mm) |
1745 | 如果非vma则 |
1747 | 转到:unacct_error |
1752 | Flags, see mm.h. 等于vm_flags |
1756 | 如果file则 |
1757 | 如果vm_flags按位与ETXTBSY on write attempts.. 则 |
1758 | error等于deny_write_access(file) |
1763 | error等于mapping_map_writable(f_mapping) |
1764 | 如果error则转到:allow_write_and_free_vma |
1775 | 如果error则转到:unmap_and_free_vma |
1785 | WARN_ON_ONCE(addr != Our start address within vm_mm. ) |
1788 | vm_flags等于Flags, see mm.h. |
1793 | 否则 |
1794 | vma_set_anonymous(vma) |
1799 | 如果file则 |
1800 | 如果vm_flags按位与VM_SHARED则mapping_unmap_writable(f_mapping) |
1806 | out : |
1807 | perf_event_mmap(vma) |
1809 | vm_stat_account(mm, vm_flags, len >> PAGE_SHIFT determines the page size ) |
1819 | 如果file则Called from mmap_region/vma_adjust with mm->mmap_sem acquired.* Currently we ignore all errors and always return 0, the callers* can't handle the failure anyway. |
1829 | Flags, see mm.h. 或等于VM_SOFTDIRTY |
1833 | 返回:addr |
1835 | unmap_and_free_vma : |
1836 | File we map to (can be NULL). = NULL |
1840 | unmap_region(mm, vma, prev, Our start address within vm_mm. , The first byte after our end addresswithin vm_mm. ) |
1841 | charged等于0 |
1842 | 如果vm_flags按位与VM_SHARED则mapping_unmap_writable(f_mapping) |
1844 | allow_write_and_free_vma : |
1847 | free_vma : |
1848 | vm_area_free(vma) |
1849 | unacct_error : |
1850 | 如果charged则vm_unacct_memory(charged) |
1852 | 返回:error |
名称 | 描述 |
---|---|
do_mmap | The caller must hold down_write(¤t->mm->mmap_sem). |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |