函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Check if paddr is at an instruction boundary

函数原型:static int can_probe(unsigned long paddr)

返回类型:int

参数:

类型参数名称
unsigned longpaddr
276  offset等于0
280  如果非kallsyms_lookup_size_offset(paddr, NULL, & offset)则返回:0
284  addr等于paddroffset
285 addr小于paddr循环
294  __addr等于Recover the probed instruction at addr for further analysis.* Caller must lock kprobes by kprobe_mutex, or disable preemption* for preventing to release referencing kprobes.* Returns zero if the instruction can not get recovered (or access failed).
295  如果非__addr则返回:0
297  Init insn for kernel text
298  sn_get_length() - Get the length of instruction*@insn: &struct insn containing instruction* If necessary, first collects the instruction up to and including the* immediates bytes.
304  如果bytes[0]恒等于BREAKPOINT_INSTRUCTION则返回:0
306  addr加等于length
309  返回:addr恒等于paddr
调用者
名称描述
arch_prepare_kprobe