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

Name:uprobe_init_insn

Proto:static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool x86_64)

Type:int

Parameter:

TypeParameterName
struct arch_uprobe *auprobe
struct insn *insn
boolx86_64
280  sn_init() - initialize struct insn*@insn: &struct insn to be initialized*@kaddr: address (in kernel memory) of instruction (or copy thereof)*@x86_64: !0 for 64-bit kernel or 64-bit app
282  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.
283  If Not Ensure this instruction is decoded completely Then Return -ENOEXEC
286  If TODO:* - Where necessary, examine the modrm byte and allow only valid instructions* in the different Groups and fpu instructions. Then Return -Operation is not supported
290  If Intel SDM Vol.3A 6.8.3 states;* "Any single-step trap that would be delivered following the MOV to SS* instruction or POP to SS instruction (because EFLAGS.TF is 1) is* suppressed."* This function returns true if @insn is MOV SS or POP SS. On these Then Return -Operation is not supported
293  If x86_64 Then good_insns = Good-instruction tables for 64-bit apps.* Genuinely invalid opcodes:* 06,07 - formerly push/pop es* 0e - formerly push cs* 16,17 - formerly push/pop ss* 1e,1f - formerly push/pop ds* 27,2f,37,3f - formerly daa/das/aaa/aas* 60,61 - formerly pusha/popa
295  Else good_insns = Good-instruction tables for 32-bit apps. This is non-const and volatile* to keep gcc from statically optimizing it out, as variable_test_bit makes* some versions of gcc to think only *(unsigned long*) is used.* Opcodes we'll probably never support:
298  If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Return 0
301  If nbytes == 2 Then
302  If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Return 0
306  Return -Operation is not supported
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.