函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Handle removing and resetting vm mappings related to the vm_struct.

函数原型:static void vm_remove_mappings(struct vm_struct *area, int deallocate_pages)

返回类型:void

参数:

类型参数名称
struct vm_struct *area
intdeallocate_pages
2231  start等于ULONG_MAX, end等于0
2232  flush_reset等于flags按位与Reset direct map and flush TLB on unmap
2233  flush_dmap等于0
2236  move_vm_area - find and remove a continuous kernel virtual area*@addr: base address* Search for the kernel VM area starting at @addr, and remove it.* This function returns the found VM area, but using it is NOT safe
2239  如果非flush_reset则返回
2246  如果非deallocate_pages
2247  vm_unmap_aliases - unmap outstanding lazy aliases in the vmap layer* The vmap/vmalloc layer lazily flushes kernel virtual mappings primarily* to amortize TLB flushing overheads
2248  返回
2256 i小于nr_pages循环
2257  addr等于page_address(pages[i])
2258  如果addr
2259  start等于两数取小(addr, start)
2260  end等于两数取大(addr + PAGE_SIZE, end)
2261  flush_dmap等于1
2270  set_area_direct_map(area, set_direct_map_invalid_noflush)
2271  _vm_unmap_aliases(start, end, flush_dmap)
2272  set_area_direct_map(area, set_direct_map_default_noflush)
调用者
名称描述
__vunmap