函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mprotect.c Create Date:2022-07-27 16:20:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:change_pte_range

函数原型:static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd, unsigned long addr, unsigned long end, pgprot_t newprot, int dirty_accountable, int prot_numa)

返回类型:unsigned long

参数:

类型参数名称
struct vm_area_struct *vma
pmd_t *pmd
unsigned longaddr
unsigned longend
pgprot_tnewprot
intdirty_accountable
intprot_numa
44  pages等于0
45  target_node等于NUMA_NO_NODE
53  如果This is a noop if Transparent Hugepage Support is not built into* the kernel则返回:0
61  pte等于pte_offset_map_lock(The address space we belong to. , pmd, addr, & ptl)
64  如果prot_numa且非Flags, see mm.h. 按位与VM_SHARED的值且atomic_read( & mm_users)恒等于1则target_node等于Returns the number of the current Node.
68  flush_tlb_batched_pending(The address space we belong to. )
69  A facility to provide lazy MMU batching()
70  循环
71  oldpte等于pte
72  如果pte_present(oldpte)则
80  如果prot_numa
121  ptent等于pte_mkwrite(ptent)
124  pages自加
157 pte自加, addr加等于PAGE_SIZE, addr不等于end循环
158  arch_leave_lazy_mmu_mode()
159  pte_unmap_unlock(pte - 1, ptl)
161  返回:pages
调用者
名称描述
change_pmd_range