函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:change_protection_range

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

返回类型:unsigned long

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longaddr
unsigned longend
pgprot_tnewprot
intdirty_accountable
intprot_numa
305  mm等于The address space we belong to.
308  start等于addr
309  pages等于0
311  BUG_ON(addr >= end)
312  pgd等于a shortcut to get a pgd_t in a given mm(mm, addr)
313  flush_cache_range(vma, addr, end)
314  inc_tlb_flush_pending(mm)
315  循环
316  next等于When walking page tables, get the address of the next boundary,* or the end address of the range if that comes earlier. Although no* vma end wraps to 0, rounded up __boundary may wrap to 0 throughout.(addr, end)
317  如果pgd_none_or_clear_bad(pgd)则继续下一循环
319  pages加等于change_p4d_range(vma, pgd, addr, next, newprot, dirty_accountable, prot_numa)
321 pgd自加, addr等于next, addr不等于end循环
324  如果pagesflush_tlb_range(vma, start, end)
326  dec_tlb_flush_pending(mm)
328  返回:pages
调用者
名称描述
change_protection