函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__uprobe_register - register a probe*@inode: the file in which the probe has to be placed

函数原型:static int __uprobe_register(struct inode *inode, loff_t offset, loff_t ref_ctr_offset, struct uprobe_consumer *uc)

返回类型:int

参数:

类型参数名称
struct inode *inode
loff_toffset
loff_tref_ctr_offset
struct uprobe_consumer *uc
1159  如果非handler且非ret_handler则返回:负EINVAL
1163  如果非readpage且非shmem_mapping(i_mapping)则返回:负EIO
1166  如果offset大于NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they 则返回:负EINVAL
1169  retry :
1170  uprobe等于alloc_uprobe(inode, offset, ref_ctr_offset)
1171  如果非uprobe则返回:负ENOMEM
1173  如果是错误则返回:错误
1180  lock for writing
1181  ret等于负EAGAIN
1182  如果此条件成立可能性大(为编译器优化)(uprobe_is_active(uprobe))则
1183  consumer_add(uprobe, uc)
1184  ret等于register_for_each_vma(uprobe, uc)
1185  如果ret__uprobe_unregister(uprobe, uc)
1188  lease a write lock
1189  put_uprobe(uprobe)
1191  如果此条件成立可能性小(为编译器优化)(ret == - EAGAIN)则转到:retry
1193  返回:ret
调用者
名称描述
uprobe_register
uprobe_register_refctr