Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:If arch_uprobe->insn doesn't use rip-relative addressing, return* immediately. Otherwise, rewrite the instruction so that it accesses* its memory operand indirectly through a scratch register. Set* defparam->fixups accordingly

Proto:static void riprel_analyze(struct arch_uprobe *auprobe, struct insn *insn)

Type:void

Parameter:

TypeParameterName
struct arch_uprobe *auprobe
struct insn *insn
340  If Not sn_rip_relative() - Does instruction use RIP-relative addressing mode?*@insn: &struct insn containing instruction* If necessary, first collects the instruction up to and including the* ModRM byte. No effect if @insn->x86_64 is 0. Then Return
348  If nbytes Then
349  cursor = insn + Offset of each field from kaddr
351  cursor &= 0xfe
357  If nbytes >= 3 Then
368  cursor = insn + insn_offset_vex_prefix(insn) + 1
369  cursor |= 0x60
412  reg = MODRM_REG(insn)
413  reg2 = 0xff
414  If nbytes Then reg2 = bytes[2]
423  reg2 = reg2 >> 3 & 0x7 ^ 0x7
430  If reg != 6 && reg2 != 6 Then
431  reg2 = 6
432  fixups |= UPROBE_FIX_RIP_SI
433  Else if reg != 7 && reg2 != 7 Then
434  reg2 = 7
435  fixups |= UPROBE_FIX_RIP_DI
437  Else
438  reg2 = 3
439  fixups |= UPROBE_FIX_RIP_BX
446  cursor = insn + insn_offset_modrm(insn)
452  cursor = 0x80 | reg << 3 | reg2
Caller
NameDescribe
arch_uprobe_analyze_insnarch_uprobe_analyze_insn - instruction analysis including validity and fixups.*@auprobe: the probepoint information.*@mm: the probed address space.*@addr: virtual address at which to install the probepoint* Return 0 on success or a -ve number on error.