函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:find_vma_links

函数原型:static int find_vma_links(struct mm_struct *mm, unsigned long addr, unsigned long end, struct vm_area_struct **pprev, struct rb_node ***rb_link, struct rb_node **rb_parent)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
unsigned longaddr
unsigned longend
struct vm_area_struct **pprev
struct rb_node ***rb_link
struct rb_node **rb_parent
532  __rb_link等于rb_node
533  rb_prev = __rb_parent = NULL
535 __rb_link循环
538  __rb_parent等于__rb_link
539  vma_tmp等于rb_entry(__rb_parent, structvm_area_struct, vm_rb)
543  如果Our start address within vm_mm. 小于end则返回:负ENOMEM
545  __rb_link等于rb_left
546  否则
547  rb_prev等于__rb_parent
548  __rb_link等于rb_right
552  * pprev = NULL
553  如果rb_prevpprev等于rb_entry(rb_prev, structvm_area_struct, vm_rb)
555  rb_link等于__rb_link
556  rb_parent等于__rb_parent
557  返回:0
调用者
名称描述
__insert_vm_structHelper for vma_adjust() in the split_vma insert case: insert a vma into the* mm's list and rbtree. It has already been inserted into the interval tree.
mmap_region
do_brk_flagshis is really a simplified "do_mmap". it only handles* anonymous maps. eventually we may be able to do some* brk-specific accounting here.
insert_vm_structInsert vm structure into process list sorted by address* and into the inode's i_mmap tree. If vm_file is non-NULL* then i_mmap_rwsem is taken here.
copy_vmaCopy the vma structure to a new location in the same mm,* prior to moving page table entries, to effect an mremap move.