函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:get_eff_addr_modrm_16() - Obtain referenced effective address via ModRM*@insn: Instruction

函数原型:static int get_eff_addr_modrm_16(struct insn *insn, struct pt_regs *regs, int *regoff, short *eff_addr)

返回类型:int

参数:

类型参数名称
struct insn *insn
struct pt_regs *regs
int *regoff
short *eff_addr
998  addr1等于0, addr2等于0
1000  如果addr_bytes不等于2则返回:负EINVAL
1003  sn_get_modrm - collect ModRM byte, if any*@insn: &struct insn containing instruction* Populates @insn->modrm and updates @insn->next_byte to point past the* ModRM byte, if any. If necessary, first collects the preceding bytes* (prefixes and opcode(s))
1005  如果非nbytes则返回:负EINVAL
1008  如果X86_MODRM_MOD(value)大于2则返回:负EINVAL
1011  ret等于get_reg_offset_16() - Obtain offset of register indicated by instruction*@insn: Instruction containing ModRM byte*@regs: Register values as seen when entering kernel mode*@offs1: Offset of the first operand register*@offs2: Offset of the second opeand
1012  如果ret小于0则返回:负EINVAL
1020  如果addr_offset1不等于负EDOMaddr1等于gs_get_register() - get register value from its offset*@regs: pt_regs from which register value is gotten.*@offset: offset number of the register.* regs_get_register returns the value of a register. The @offset is the按位与0xffff
1023  如果addr_offset2不等于负EDOMaddr2等于gs_get_register() - get register value from its offset*@regs: pt_regs from which register value is gotten.*@offset: offset number of the register.* regs_get_register returns the value of a register. The @offset is the按位与0xffff
1026  displacement等于value按位与0xffff
1027  eff_addr等于addr1addr2displacement
1035  regoff等于addr_offset1
1037  返回:0
调用者
名称描述
get_addr_ref_16get_addr_ref_16() - Obtain the 16-bit address referred by instruction*@insn: Instruction containing ModRM byte and displacement*@regs: Register values as seen when entering kernel mode* This function is to be used with 16-bit address encodings