函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:get_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

函数原型:static void __user *get_addr_ref_16(struct insn *insn, struct pt_regs *regs)

返回类型:void

参数:

类型参数名称
struct insn *insn
struct pt_regs *regs
1143  linear_addr等于负1L
1148  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))
1149  sn_get_displacement() - Get the displacement of instruction*@insn: &struct insn containing instruction* If necessary, first collects the instruction up to and including the* SIB byte.* Displacement value is sign-expanded.
1151  如果addr_bytes不等于2则转到:out
1154  如果X86_MODRM_MOD(value)恒等于3则
1155  ret等于get_eff_addr_reg() - Obtain effective address from register operand*@insn: Instruction
1156  如果ret则转到:out
1159  eff_addr等于tmp
1160  否则
1161  ret等于get_eff_addr_modrm_16() - Obtain referenced effective address via ModRM*@insn: Instruction
1162  如果ret则转到:out
1166  ret等于get_seg_base_limit() - obtain base address and limit of a segment*@insn: Instruction
1167  如果ret则转到:out
1176  如果eff_addr按位与0xffff的值大于seg_limit则转到:out
1179  linear_addr等于eff_addr按位与0xffff的值加seg_base
1182  如果v8086_mode(regs)则linear_addr与等于0xfffff
1185  out :
1186  返回:linear_addr
调用者
名称描述
insn_get_addr_refsn_get_addr_ref() - Obtain the linear address referred by instruction*@insn: Instruction structure containing ModRM byte and displacement*@regs: Structure with register values as seen when entering kernel mode* Obtain the linear address referred by the