函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:For a given range in vma, build a list of probes that need to be inserted.

函数原型:static void build_probe_list(struct inode *inode, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct list_head *head)

返回类型:void

参数:

类型参数名称
struct inode *inode
struct vm_area_struct *vma
unsigned longstart
unsigned longend
struct list_head *head
1303  初始化链表头
1304  min等于vaddr_to_offset(vma, start)
1305  max等于minendstart减1
1307  加自旋锁
1308  n等于find_node_in_range(inode, min, max)
1309  如果n
1310 t循环
1311  u等于rb_entry(t, structuprobe, rb_node)
1312  如果 Also hold a ref to inode 不等于inodeoffset小于min退出
1315  get_uprobe(u)
1317 t等于rb_next(t)循环
1318  u等于rb_entry(t, structuprobe, rb_node)
1319  如果 Also hold a ref to inode 不等于inodeoffset大于max退出
1322  get_uprobe(u)
1325  自旋锁解锁
调用者
名称描述
uprobe_mmapCalled from mmap_region/vma_adjust with mm->mmap_sem acquired.* Currently we ignore all errors and always return 0, the callers* can't handle the failure anyway.