Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\kprobes\core.c Create Date:2022-07-28 08:38:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__recover_probed_insn

Proto:static unsigned long __recover_probed_insn(kprobe_opcode_t *buf, unsigned long addr)

Type:unsigned long

Parameter:

TypeParameterName
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  If WARN_ON(faddr && faddr != addr) Then Return 0UL
223  If Not kp && Not faddr Then Return addr
245  If 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 Then Return 0UL
249  If faddr Then memcpy(buf, Initialize these to a safe default [Entry for the 5-byte atomic NOP ], 5)
251  Else buf[0] = Saved opcode (which has been replaced with breakpoint)
253  Return buf
Caller
NameDescribe
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).