函数逻辑报告 |
Source Code:mm\mprotect.c |
Create Date:2022-07-27 16:20:55 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:mprotect_fixup
函数原型:int mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, unsigned long start, unsigned long end, unsigned long newflags)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct vm_area_struct * | vma | |
struct vm_area_struct ** | pprev | |
unsigned long | start | |
unsigned long | end | |
unsigned long | newflags |
377 | oldflags等于Flags, see mm.h. |
379 | charged等于0 |
382 | dirty_accountable等于0 |
413 | 如果非Return true if the calling process may expand its vm space by the passed* number of pages且Return true if the calling process may expand its vm space by the passed* number of pages则返回:负ENOMEM |
416 | 如果非oldflags按位与Is a VM accounted object 按位或VM_WRITE按位或Huge TLB Page VM 按位或VM_SHARED按位或should the VM suppress accounting 的值的值则 |
419 | 如果security_vm_enough_memory_mm(mm, charged)则返回:负ENOMEM |
428 | pgoff等于Offset (within vm_file) in PAGE_SIZEunits 加start减Our start address within vm_mm. 右移PAGE_SHIFT determines the page size 位的值 |
429 | pprev等于Given a mapping request (addr,end,vm_flags,file,pgoff), figure out* whether that can be merged with its predecessor or its successor |
432 | 如果pprev则 |
440 | 如果start不等于Our start address within vm_mm. 则 |
452 | success : |
457 | Flags, see mm.h. 等于newflags |
473 | vm_stat_account(mm, oldflags, - nrpages) |
474 | vm_stat_account(mm, newflags, nrpages) |
475 | perf_event_mmap(vma) |
476 | 返回:0 |
478 | fail : |
479 | vm_unacct_memory(charged) |
480 | 返回:error |
名称 | 描述 |
---|---|
do_mprotect_pkey | pkey==-1 when doing a legacy mprotect() |
setup_arg_pages | Finalizes the stack vm_area_struct. The flags and permissions are updated,* the stack is optionally relocated, and some extra space is added. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |