函数逻辑报告 |
Source Code:mm\mprotect.c |
Create Date:2022-07-27 16:21:07 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:pkey==-1 when doing a legacy mprotect()
函数原型:static int do_mprotect_pkey(unsigned long start, size_t len, unsigned long prot, int pkey)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned long | start | |
size_t | len | |
unsigned long | prot | |
int | pkey |
492 | grows等于prot按位与mprotect flag: extend change to start of growsdown vma 按位或mprotect flag: extend change to end of growsup vma 的值 |
493 | rier等于personality按位与READ_IMPLIES_EXEC且prot按位与page can be read |
498 | prot与等于mprotect flag: extend change to start of growsdown vma 按位或mprotect flag: extend change to end of growsup vma 的值的反 |
499 | 如果grows恒等于mprotect flag: extend change to start of growsdown vma 按位或mprotect flag: extend change to end of growsup vma 的值则返回:负EINVAL |
504 | 如果非len则返回:0 |
510 | 如果非This is called from mprotect(). PROT_GROWSDOWN and PROT_GROWSUP have* already been masked out.* Returns true if the prot flags are valid则返回:负EINVAL |
515 | 如果lock for writing则返回:负EINTR |
523 | 如果pkey不等于负1且非mm_pkey_is_allocated(mm, pkey)则转到:out |
532 | 如果Our start address within vm_mm. 大于等于end则转到:out |
536 | 如果非Flags, see mm.h. 按位与general info on the segment 的值则转到:out |
538 | 否则 |
539 | 如果Our start address within vm_mm. 大于start则转到:out |
544 | 如果非Flags, see mm.h. 按位与VM_GROWSUP的值则转到:out |
548 | 如果start大于Our start address within vm_mm. 则prev等于vma |
551 | 循环 |
559 | 如果rier且Flags, see mm.h. 按位与VM_MAYEXEC则prot或等于page can be executed |
572 | newflags或等于Flags, see mm.h. 按位与mask_off_old_flags的反 |
575 | 如果newflags按位与newflags右移4位的值的反按位与currently active flags 按位或VM_WRITE按位或VM_EXEC的值则 |
580 | error等于security_file_mprotect(vma, reqprot, prot) |
592 | 如果nstart小于The first byte after our end addresswithin vm_mm. 则nstart等于The first byte after our end addresswithin vm_mm. |
598 | 如果非vma或Our start address within vm_mm. 不等于nstart则 |
604 | out : |
606 | 返回:error |
名称 | 描述 |
---|---|
SYSCALL_DEFINE3 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |