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:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Check if paddr is at an instruction boundary

Proto:static int can_probe(unsigned long paddr)

Type:int

Parameter:

TypeParameterName
unsigned longpaddr
276  offset = 0
280  If Not kallsyms_lookup_size_offset(paddr, NULL, & offset) Then Return 0
284  addr = paddr - offset
285  When addr < paddr cycle
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  If Not __addr Then Return 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  If bytes[0] == BREAKPOINT_INSTRUCTION Then Return 0
306  addr += length
309  Return addr == paddr
Caller
NameDescribe
arch_prepare_kprobe