函数逻辑报告 |
Source Code:mm\nommu.c |
Create Date:2022-07-27 16:03:17 |
Last Modify:2020-03-17 21:26:27 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:determine whether a mapping should be permitted and, if so, what sort of* mapping we're capable of supporting
函数原型:static int validate_mmap_request(struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long pgoff, unsigned long *_capabilities)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct file * | file | |
unsigned long | addr | |
unsigned long | len | |
unsigned long | prot | |
unsigned long | flags | |
unsigned long | pgoff | |
unsigned long * | _capabilities |
797 | 如果flags按位与Interpret addr exactly 则返回:负EINVAL |
800 | 如果flags按位与Mask for type of mapping 的值不等于Changes are private 且flags按位与Mask for type of mapping 的值不等于Share changes 则返回:负EINVAL |
813 | 如果pgoff加rlen右移PAGE_SHIFT determines the page size 位的值小于pgoff则返回:负EOVERFLOW |
816 | 如果file则 |
825 | 如果mmap_capabilities则 |
827 | 否则 |
833 | capabilities等于These flags let !MMU mmap() govern direct device mapping vs immediate* copying more easily for MAP_PRIVATE, especially for ROM filesystems |
834 | 退出 |
841 | 退出 |
843 | 默认 |
844 | 返回:负EINVAL |
850 | 如果非get_unmapped_area则capabilities与等于NOMMU_MAP_DIRECT的反 |
852 | 如果非f_mode按位与Has read method(s) 的值则capabilities与等于These flags let !MMU mmap() govern direct device mapping vs immediate* copying more easily for MAP_PRIVATE, especially for ROM filesystems的反 |
856 | 如果非f_mode按位与le is open for reading 的值则返回:负EACCES |
859 | 如果flags按位与Share changes 则 |
861 | 如果prot按位与page can be written 且非f_mode按位与le is open for writing 的值则返回:负EACCES |
865 | 如果IS_APPEND(file_inode(file))且f_mode按位与le is open for writing 则返回:负EACCES |
869 | 如果locks_verify_locked(file)则返回:负EAGAIN |
872 | 如果非capabilities按位与NOMMU_MAP_DIRECT的值则返回:负ENODEV |
877 | 否则 |
880 | 如果非capabilities按位与These flags let !MMU mmap() govern direct device mapping vs immediate* copying more easily for MAP_PRIVATE, especially for ROM filesystems的值则返回:负ENODEV |
885 | 如果prot按位与page can be written 则capabilities与等于NOMMU_MAP_DIRECT的反 |
889 | 如果capabilities按位与NOMMU_MAP_DIRECT则 |
890 | 如果prot按位与page can be read 且非capabilities按位与NOMMU_MAP_READ的值或prot按位与page can be written 且非capabilities按位与NOMMU_MAP_WRITE的值或prot按位与page can be executed 且非capabilities按位与NOMMU_MAP_EXEC的值则 |
894 | capabilities与等于NOMMU_MAP_DIRECT的反 |
895 | 如果flags按位与Share changes 则 |
904 | 如果path_noexec( & f_path)则 |
905 | 如果prot按位与page can be executed 则返回:负EPERM |
907 | 否则如果prot按位与page can be read 且非prot按位与page can be executed 的值则 |
909 | 如果personality按位与READ_IMPLIES_EXEC则 |
910 | 如果capabilities按位与NOMMU_MAP_EXEC则prot或等于page can be executed |
913 | 否则如果prot按位与page can be read 且prot按位与page can be executed 且非capabilities按位与NOMMU_MAP_EXEC的值则 |
918 | capabilities与等于NOMMU_MAP_DIRECT的反 |
920 | 否则 |
924 | capabilities等于These flags let !MMU mmap() govern direct device mapping vs immediate* copying more easily for MAP_PRIVATE, especially for ROM filesystems |
927 | 如果prot按位与page can be read 且personality按位与READ_IMPLIES_EXEC则prot或等于page can be executed |
933 | ret等于security_mmap_addr(addr) |
939 | 返回:0 |
名称 | 描述 |
---|---|
do_mmap | handle mapping creation for uClinux |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |