函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Look up the first VMA which satisfies addr < vm_end, NULL if none.

函数原型:struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)

返回类型:struct vm_area_struct

参数:

类型参数名称
struct mm_struct *mm
unsigned longaddr
2219  vma等于vmacache_find(mm, addr)
2220  如果此条件成立可能性大(为编译器优化)(vma)则返回:vma
2223  rb_node等于rb_node
2225 rb_node循环
2228  tmp等于rb_entry(rb_node, structvm_area_struct, vm_rb)
2231  vma等于tmp
2232  如果Our start address within vm_mm. 小于等于addr退出
2234  rb_node等于rb_left
2235  否则rb_node等于rb_right
2239  如果vmavmacache_update(addr, vma)
2241  返回:vma
调用者
名称描述
arch_get_unmapped_area_topdown
mark_screen_rdonly
seq_print_user_ip
stack_map_get_build_id_offset
register_for_each_vma
find_active_uprobe
kobjsizeReturn the total memory allocated for this pointer, not* just what the caller asked for.* Doesn't have to be accurate, i.e. may have races.
__vmalloc_user_flags
find_extend_vmad a VMA* - we don't extend stack VMAs under NOMMU conditions
do_munmaplease a mapping* - under NOMMU conditions the chunk to be unmapped must be backed by a single* VMA, though it need not cover the whole VMA
__access_remote_vm
print_vma_addrPrint the name of a VMA.
do_mincoreDo a chunk of "sys_mincore()". We've already checked* all the arguments, we hold the mmap semaphore: we should* just return the amount of info we're asked for.
apply_vma_lock_flags
count_mm_mlocked_page_nrGo through vma areas and sum size of mlocked* vma pages, as return value.* Note deferred memory locking case(mlock2(,,MLOCK_ONFAULT)* is also counted.* Return value: previously mlocked page counts
SYSCALL_DEFINE1
do_mmapThe caller must hold down_write(¤t->mm->mmap_sem).
find_vma_prevSame as find_vma, but also return a pointer to the previous VMA in *pprev.
find_extend_vma
__do_munmapMunmap is split into 2 main parts -- this part which finds* what needs doing, and the areas themselves, which do the* work. This now handles partial unmappings.* Jeremy Fitzhardinge
SYSCALL_DEFINE5Emulation of deprecated remap_file_pages() syscall.
do_mprotect_pkeypkey==-1 when doing a legacy mprotect()
vma_to_resize
SYSCALL_DEFINE3MS_SYNC syncs the entire file - including mappings
walk_page_rangewalk_page_range - walk page table with caller specific callbacks*@mm: mm_struct representing the target process of page table walk*@start: start address of the virtual address range*@end: end address of the virtual address range*@ops: operation to call
madvise_dontneed_free
SYSCALL_DEFINE3The madvise(2) system call
mbind_rangeStep 2: apply policy to a range and do splits.
new_pageAllocate a new page for page migration based on vma policy
find_mergeable_vma
scan_get_next_rmap_item
add_page_for_migrationResolves the given address to a struct page, isolates it from the LRU and* puts it to the given pagelist
do_pages_stat_arrayDetermine the nodes of an array of pages and store it in an array of status.
hugepage_vma_revalidateIf mmap_sem temporarily dropped, revalidate vma* before taking mmap_sem.* Return 0 if succeeds, otherwise return none-zero* value (scan code).
khugepaged_scan_mm_slot
find_dst_vma
__mm_populate__mm_populate - populate and/or mlock pages within a range of address space.* This is used to implement mlock() and the MAP_POPULATE / MAP_LOCKED mmap* flags. VMAs must be already marked with the desired vm_flags, and* mmap_sem must not be held.