函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:build_map_info

函数原型:static struct map_info *build_map_info(struct address_space *mapping, loff_t offset, bool is_register)

返回类型:struct map_info

参数:

类型参数名称
struct address_space *mapping
loff_toffset
boolis_register
978  pgoff等于offset右移PAGE_SHIFT determines the page size
980  struct map_info * curr = NULL
981  struct map_info * prev = NULL
983  more等于0
985  again :
986  i_mmap_lock_read(mapping)
988  如果非valid_vma: Verify if the specified vma is an executable vma* Relax restrictions while unregistering: vm_flags might have* changed after breakpoint was inserted则继续下一循环
991  如果非prev且非more
996  prev等于开辟内存
998  如果prevnext = NULL
1001  如果非prev
1002  more自加
1003  继续下一循环
1006  如果非mmget_not_zero(The address space we belong to. )则继续下一循环
1009  info等于prev
1010  prev等于next
1011  next等于curr
1012  curr等于info
1014  mm等于The address space we belong to.
1015  vaddr等于offset_to_vaddr(vma, offset)
1017  i_mmap_unlock_read(mapping)
1019  如果非more则转到:out
1022  prev等于curr
1023 curr循环
1024  Decrement the use count and release all resources for an mm.
1025  curr等于next
1028  循环
1029  info等于开辟内存
1030  如果非info
1031  curr等于错误号
1032  转到:out
1034  next等于prev
1035  prev等于info
1036 more先自减循环
1038  转到:again
1039  out :
1040 prev循环
1041  prev等于free_map_info(prev)
1042  返回:curr
调用者
名称描述
register_for_each_vma