Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:zero_pte_populate

Proto:static void __ref zero_pte_populate(pmd_t *pmd, unsigned long addr, unsigned long end)

Type:void

Parameter:

TypeParameterName
pmd_t *pmd
unsigned longaddr
unsigned longend
99  pte = pte_offset_kernel(pmd, addr)
102  zero_pte = pfn_pte(PFN_DOWN(We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(This page serves two purposes:* - It used as early shadow memory. The entire shadow region populated* with this page, before we will be able to setup normal shadow memory.* - Latter it reused it as zero shadow to cover large ranges of memory)), PAGE_KERNEL)
104  zero_pte = pte_wrprotect(zero_pte)
106  When addr + PAGE_SIZE <= end cycle
107  set_pte_at( & For dynamically allocated mm_structs, there is a dynamically sized cpumask* at the end of the structure, the size of which depends on the maximum CPU* number the system can see, addr, pte, zero_pte)
108  addr += PAGE_SIZE
109  pte = pte_offset_kernel(pmd, addr)
Caller
NameDescribe
zero_pmd_populate