函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kprobes.c Create Date:2022-07-27 12:39:26
Last Modify:2022-05-22 18:14:58 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:This is the second or subsequent kprobe at the address - handle* the intricacies

函数原型:static int register_aggr_kprobe(struct kprobe *orig_p, struct kprobe *p)

返回类型:int

参数:

类型参数名称
struct kprobe *orig_p
struct kprobe *p
1347  ret等于0
1348  ap等于orig_p
1350  cpus_read_lock()
1353  jump_label_lock()
1354  mutex_lock( & mutex protecting text section modification (dynamic code patching).* some users need to sleep (allocating memory...) while they hold this lock.* Note: Also protects SMP-alternatives modification on x86.)
1356  如果非Return true if the kprobe is an aggregator
1358  ap等于Allocate new optimized_kprobe and try to prepare optimized instructions
1359  如果非ap
1360  ret等于负ENOMEM
1361  转到:out
1363  init_aggr_kprobe(ap, orig_p)
1364  否则如果Return true(!0) if the kprobe is unused
1366  ret等于Cancel unoptimizing for reusing
1367  如果ret则转到:out
1371  如果Has this kprobe gone ?
1378  ret等于arch_prepare_kprobe(ap)
1379  如果ret则转到:out
1388  Try to prepare optimized instructions
1394  * Indicates various status flags. * Protected by kprobe_mutex after this kprobe is registered.等于* Indicates various status flags. * Protected by kprobe_mutex after this kprobe is registered.按位与akpoint has already gone 的反按位或probe is temporarily disabled
1399  Keep all fields in the kprobe consistent
1400  ret等于Add the new probe to ap->list
1402  out :
1403  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1404  jump_label_unlock()
1405  cpus_read_unlock()
1407  如果ret恒等于0且Is this kprobe disabled ? 且非Is this kprobe disabled ?
1408  * Indicates various status flags. * Protected by kprobe_mutex after this kprobe is registered.与等于probe is temporarily disabled 的反
1412  如果ret
1419  返回:ret
调用者
名称描述
register_kprobe