Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\kprobes\opt.c Create Date:2022-07-28 08:39:10
Last Modify:2022-05-22 07:44:06 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__recover_optprobed_insn

Proto:unsigned long __recover_optprobed_insn(kprobe_opcode_t *buf, unsigned long addr)

Type:unsigned long

Parameter:

TypeParameterName
kprobe_opcode_t *buf
unsigned longaddr
41  When i < RELATIVEJUMP_SIZE cycle
42  kp = Get the kprobe at this addr (if any) - called with preemption disabled
52  Return addr
53  found :
59  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
63  If addr == location of the probe point Then
64  buf[0] = Saved opcode (which has been replaced with breakpoint)
65  memcpy(buf + 1, copied_insn, RELATIVE_ADDR_SIZE)
66  Else
67  offs = addr - location of the probe point - 1
68  memcpy(buf, copy of the original instructions + offs, RELATIVE_ADDR_SIZE - offs)
71  Return buf