函数逻辑报告 |
Source Code:mm\gup.c |
Create Date:2022-07-27 16:00:34 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:get_gate_page
函数原型:static int get_gate_page(struct mm_struct *mm, unsigned long address, unsigned int gup_flags, struct vm_area_struct **vma, struct page **page)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct mm_struct * | mm | |
| unsigned long | address | |
| unsigned int | gup_flags | |
| struct vm_area_struct ** | vma | |
| struct page ** | page |
| 572 | 如果gup_flags按位与check pte is writable 则返回:负EFAULT |
| 574 | 如果address大于TASK_SIZE则pgd等于a shortcut which implies the use of the kernel's pgd, instead* of a process's(address) |
| 576 | 否则pgd等于pgd_offset_gate(mm, address) |
| 578 | 如果The "pgd_xxx()" functions here are trivial for a folded two-level* setup: the p4d is never bad, and a p4d always exists (as it's folded* into the pgd entry)则返回:负EFAULT |
| 580 | p4d等于p4d_offset(pgd, address) |
| 581 | 如果The "p4d_xxx()" functions here are trivial for a folded two-level* setup: the pud is never bad, and a pud always exists (as it's folded* into the p4d entry)则返回:负EFAULT |
| 583 | pud等于pud_offset(p4d, address) |
| 584 | 如果The "pud_xxx()" functions here are trivial for a folded two-level* setup: the pmd is never bad, and a pmd always exists (as it's folded* into the pud entry)则返回:负EFAULT |
| 586 | pmd等于pmd_offset(pud, address) |
| 587 | 如果非pmd_present( * pmd)则返回:负EFAULT |
| 589 | VM_BUG_ON(pmd_trans_huge( * pmd)) |
| 590 | pte等于pte_offset_map(pmd, address) |
| 593 | vma等于get_gate_vma(mm) |
| 596 | page等于vm_normal_page( * vma, address, * pte) |
| 597 | 如果非page则 |
| 598 | 如果gup_flags按位与give error on hole if it would be zero 或非is_zero_pfn(pte_pfn( * pte))则转到:unmap |
| 602 | 如果此条件成立可能性小(为编译器优化)(!try_get_page( * page))则 |
| 606 | out : |
| 607 | ret等于0 |
| 608 | unmap : |
| 610 | 返回:ret |
| 名称 | 描述 |
|---|---|
| __get_user_pages | __get_user_pages() - pin user pages in memory*@tsk: task_struct of target task*@mm: mm_struct of target mm*@start: starting user address*@nr_pages: number of pages from start to pin*@gup_flags: flags modifying pin behaviour |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |