Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:change_pmd_range

Proto:static inline unsigned long change_pmd_range(struct vm_area_struct *vma, pud_t *pud, 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
pud_t *pud
unsigned longaddr
unsigned longend
pgprot_tnewprot
intdirty_accountable
intprot_numa
195  pages = 0
196  nr_huge_updates = 0
199  start = 0
201  pmd = pmd_offset(pud, addr)
202  Do
205  next = pmd_addr_end(addr, end)
215  If Not is_swap_pmd( * pmd) && Not pmd_devmap( * pmd) && Used when setting automatic NUMA hinting protection where it is* critical that a numa hinting PMD is not confused with a bad PMD. Then Go to next
220  If Not start Then
227  If is_swap_pmd( * pmd) || pmd_trans_huge( * pmd) || pmd_devmap( * pmd) Then
228  If next - addr != HPAGE_PMD_SIZE Then
230  Else
234  If nr_ptes Then
235  If nr_ptes == HPAGE_PMD_NR Then
241  Go to next
246  this_pages = change_pte_range(vma, pmd, addr, next, newprot, dirty_accountable, prot_numa)
248  pages += this_pages
249  :
250  cond_resched()
251  When pmd++, addr = next , addr != end cycle
253  If start Then mmu_notifier_invalidate_range_end( & range)
256  If nr_huge_updates Then count_vm_numa_events(NUMA_HUGE_PTE_UPDATES, nr_huge_updates)
258  Return pages
Caller
NameDescribe
change_pud_range