函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Walk a vmap address to the struct page it maps.

函数原型:struct page *vmalloc_to_page(const void *vmalloc_addr)

返回类型:struct page

参数:

类型参数名称
const void *vmalloc_addr
271  addr等于vmalloc_addr
272  struct page * page = NULL
273  pgd等于a shortcut which implies the use of the kernel's pgd, instead* of a process's(addr)
283  VIRTUAL_BUG_ON(!is_vmalloc_or_module_addr(vmalloc_addr))
285  如果The "pgd_xxx()" functions here are trivial for a folded two-level* setup: the p4d is never bad, and a p4d always exists (as it's folded* into the pgd entry)则返回:NULL
287  p4d等于p4d_offset(pgd, addr)
288  如果The "p4d_xxx()" functions here are trivial for a folded two-level* setup: the pud is never bad, and a pud always exists (as it's folded* into the p4d entry)则返回:NULL
290  pud等于pud_offset(p4d, addr)
300  WARN_ON_ONCE(pud_bad( * pud))
301  如果The "pud_xxx()" functions here are trivial for a folded two-level* setup: the pmd is never bad, and a pmd always exists (as it's folded* into the pud entry)pud_bad( * pud)则返回:NULL
303  pmd等于pmd_offset(pud, addr)
304  WARN_ON_ONCE(pmd_bad( * pmd))
305  如果pmd_none( * pmd)或pmd_bad( * pmd)则返回:NULL
308  ptep等于pte_offset_map(pmd, addr)
309  pte等于ptep
310  如果pte_present(pte)则page等于pte_page(pte)
312  pte_unmap(ptep)
313  返回:page
调用者
名称描述
__text_poke
relay_buf_faultault() vm_op implementation for relay file mapping.
vmalloc_to_pfnMap a vmalloc()-space virtual address to the physical page frame number.
aligned_vreadsmall helper routine , copy contents to buf from addr.* If the page is not present, fill zero.
aligned_vwrite
remap_vmalloc_range_partialmap_vmalloc_range_partial - map vmalloc pages to userspace*@vma: vma to cover*@uaddr: target user address to start at*@kaddr: virtual address of vmalloc kernel memory*@size: size of map area* Returns: 0 for success, -Exxx on failure* This function checks
swp_swapcountHow many references to @entry are currently swapped out?* This considers COUNT_CONTINUED so it returns exact answer.
add_swap_count_continuationadd_swap_count_continuation - called when a swap count is duplicated* beyond SWAP_MAP_MAX, it allocates a new page and links that to the entry's* page of the original vmalloc'ed swap_map, to hold the continuation count
swap_count_continuedswap_count_continued - when the original swap_map count is incremented* from SWAP_MAP_MAX, check if there is already a continuation page to carry* into, carry if so, or else fail until a new continuation page is allocated;* when the original swap_map
free_swap_count_continuations_swap_count_continuations - swapoff free all the continuation pages* appended to the swap_map, after swap_map is quiesced, before vfree'ing it.