函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_kprobes

函数原型:static int test_kprobes(void)

返回类型:int

参数:

112  struct kprobe * kps[2] = { & kp, & kp2}
115  location of the probe point = NULL
116  * Indicates various status flags. * Protected by kprobe_mutex after this kprobe is registered.等于0
117  ret等于register_kprobes(kps, 2)
118  如果ret小于0则
119  打印错误信息("register_kprobes returned %d\n", ret)
120  返回:ret
123  preh_val等于0
124  posth_val等于0
125  ret等于target(rand1)
127  如果preh_val恒等于0则
128  打印错误信息("kprobe pre_handler not called\n")
129  handler_errors自加
132  如果posth_val恒等于0则
133  打印错误信息("kprobe post_handler not called\n")
134  handler_errors自加
137  preh_val等于0
138  posth_val等于0
139  ret等于target2(rand1)
141  如果preh_val恒等于0则
142  打印错误信息("kprobe pre_handler2 not called\n")
143  handler_errors自加
146  如果posth_val恒等于0则
147  打印错误信息("kprobe post_handler2 not called\n")
148  handler_errors自加
151  unregister_kprobes(kps, 2)
152  返回:0
调用者
名称描述
init_test_probes