函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:This function frees user-level page tables of a process.

函数原型:void free_pgd_range(struct mmu_gather *tlb, unsigned long addr, unsigned long end, unsigned long floor, unsigned long ceiling)

返回类型:void

参数:

类型参数名称
struct mmu_gather *tlb
unsigned longaddr
unsigned longend
unsigned longfloor
unsigned longceiling
359  addr与等于PMD_MASK
360  如果addr小于floor
361  addr加等于PMD_SIZE
362  如果非addr则返回
365  如果ceiling
366  ceiling与等于PMD_MASK
367  如果非ceiling则返回
370  如果end减1大于ceiling减1则end减等于PMD_SIZE
372  如果addr大于end减1则返回
378  tlb_change_page_size(tlb, PAGE_SIZE)
379  pgd等于a shortcut to get a pgd_t in a given mm(mm, addr)
380  循环
381  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)
382  如果pgd_none_or_clear_bad(pgd)则继续下一循环
384  free_p4d_range(tlb, pgd, addr, next, floor, ceiling)
385 pgd自加, addr等于next, addr不等于end循环
调用者
名称描述
free_pgtables
shift_arg_pagesDuring bprm_mm_init(), we create a temporary stack at STACK_TOP_MAX. Once* the binfmt code determines where the new stack should reside, we shift it to* its final location. The process proceeds as follows:* 1) Use shift to calculate the new vma endpoints.