函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:init_kprobes

函数原型:static int __init init_kprobes(void)

返回类型:int

参数:

2273  err等于0
2277 i小于KPROBE_TABLE_SIZE循环
2278  INIT_HLIST_HEAD( & kprobe_table[i])
2279  INIT_HLIST_HEAD( & kretprobe_inst_table[i])
2280  raw_spin_lock_init( & (lock))
2283  err等于Lookup and populate the kprobe_blacklist.* Unlike the kretprobe blacklist, we'll need to determine* the range of addresses that belong to the said functions,* since a kprobe need not necessarily be at the beginning* of a function.
2285  如果err
2286  打印错误信息("kprobes: failed to populate blacklist: %d\n", err)
2287  打印错误信息("Please take care of using kprobes.\n")
2290  如果kretprobe_blacklist_size
2292 name != NULL循环
2293  addr等于kprobe_lookup_name(name, 0)
2304  size of instruction slot 等于MAX_OPTINSN_SIZE
2307  NOTE: change this value only with kprobe_mutex held = true
2311  NOTE: change this value only with kprobe_mutex held = false
2313  err等于arch_init_kprobes()
2314  如果非errerr等于register_die_notifier( & kprobe_exceptions_nb)
2316  如果非errerr等于register_module_notifier( & kprobe_module_nb)
2319  kprobes_initialized等于err恒等于0
2321  如果非errinit_test_probes()
2323  返回:err