Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\uprobes.c Create Date:2022-07-28 13:45:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:For a given range in vma, build a list of probes that need to be inserted.

Proto:static void build_probe_list(struct inode *inode, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct list_head *head)

Type:void

Parameter:

TypeParameterName
struct inode *inode
struct vm_area_struct *vma
unsigned longstart
unsigned longend
struct list_head *head
1303  Initialization list head
1304  min = vaddr_to_offset(vma, start)
1305  max = min + end - start - 1
1307  spin_lock( & uprobes_treelock)
1308  n = find_node_in_range(inode, min, max)
1309  If n Then
1310  When t cycle
1311  u = rb_entry(t, structuprobe, rb_node)
1312  If Also hold a ref to inode != inode || offset < min Then Break
1315  get_uprobe(u)
1317  When t = rb_next(t) cycle
1318  u = rb_entry(t, structuprobe, rb_node)
1319  If Also hold a ref to inode != inode || offset > max Then Break
1322  get_uprobe(u)
1325  spin_unlock( & uprobes_treelock)
Caller
NameDescribe
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.