函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\uprobes.c Create Date:2022-07-27 09:46:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:uprobe_init_insn

函数原型:static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool x86_64)

返回类型:int

参数:

类型参数名称
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  如果非Ensure this instruction is decoded completely 则返回:负ENOEXEC
286  如果TODO:* - Where necessary, examine the modrm byte and allow only valid instructions* in the different Groups and fpu instructions.则返回:负Operation is not supported
290  如果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则返回:负Operation is not supported
293  如果x86_64good_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  否则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  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from则返回:0
301  如果nbytes恒等于2则
302  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from则返回:0
306  返回:负Operation is not supported
调用者
名称描述
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.