函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static int get_eff_addr_sib(struct insn *insn, struct pt_regs *regs, int *base_offset, long *eff_addr)

返回类型:int

参数:

类型参数名称
struct insn *insn
struct pt_regs *regs
int *base_offset
long *eff_addr
1068  如果addr_bytes不等于8且addr_bytes不等于4则返回:负EINVAL
1071  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))
1073  如果非nbytes则返回:负EINVAL
1076  如果X86_MODRM_MOD(value)大于2则返回:负EINVAL
1079  sn_get_sib() - Get the SIB byte of instruction*@insn: &struct insn containing instruction* If necessary, first collects the instruction up to and including the* ModRM byte.
1081  如果非nbytes则返回:负EINVAL
1084  base_offset等于get_reg_offset(insn, regs, REG_TYPE_BASE)
1085  indx_offset等于get_reg_offset(insn, regs, REG_TYPE_INDEX)
1092  如果base_offset恒等于负EDOMbase等于0
1094  否则如果base_offset小于0则返回:负EINVAL
1096  否则base等于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
1099  如果indx_offset恒等于负EDOMindx等于0
1101  否则如果indx_offset小于0则返回:负EINVAL
1103  否则indx等于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
1106  如果addr_bytes恒等于4则
1109  base32等于base按位与0xffffffff
1110  idx32等于indx按位与0xffffffff
1112  addr32等于base32idx32乘1左移X86_SIB_SCALE(value)位的值
1113  addr32加等于value
1115  eff_addr等于addr32按位与0xffffffff
1116  否则
1117  eff_addr等于baseindx乘1左移X86_SIB_SCALE(value)位的值
1118  eff_addr加等于value
1121  返回:0
调用者
名称描述
get_addr_ref_32get_addr_ref_32() - Obtain a 32-bit linear address*@insn: Instruction with ModRM, SIB bytes and displacement*@regs: Register values as seen when entering kernel mode* This function is to be used with 32-bit address encodings to obtain the* linear memory
get_addr_ref_64