函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__recover_probed_insn

函数原型:static unsigned long __recover_probed_insn(kprobe_opcode_t *buf, unsigned long addr)

返回类型:unsigned long

参数:

类型参数名称
kprobe_opcode_t *buf
unsigned longaddr
210  kp等于Get the kprobe at this addr (if any) - called with preemption disabled
211  faddr等于ftrace_location(addr)
217  如果WARN_ON(faddr && faddr != addr)则返回:0UL
223  如果非kp且非faddr则返回:addr
245  如果probe_kernel_read(): safely attempt to read from a location*@dst: pointer to the buffer that shall take the data*@src: address to read from*@size: size of the data chunk* Safely read from address @src to the buffer at @dst. If a kernel fault则返回:0UL
249  如果faddrmemcpy(buf, Initialize these to a safe default [Entry for the 5-byte atomic NOP ], 5)
251  否则buf[0]等于 Saved opcode (which has been replaced with breakpoint)
253  返回:buf
调用者
名称描述
recover_probed_instructionRecover 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).