Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mprotect.c Create Date:2022-07-28 14:52:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:change_protection_range

Proto: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)

Type:unsigned long

Parameter:

TypeParameterName
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  Do
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  If pgd_none_or_clear_bad(pgd) Then Continue
319  pages += change_p4d_range(vma, pgd, addr, next, newprot, dirty_accountable, prot_numa)
321  When pgd++, addr = next , addr != end cycle
324  If pages Then flush_tlb_range(vma, start, end)
326  dec_tlb_flush_pending(mm)
328  Return pages
Caller
NameDescribe
change_protection