Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\lib\insn-eval.c Create Date:2022-07-28 07:25:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:get_eff_addr_modrm() - Obtain referenced effective address via ModRM*@insn: Instruction

Proto:static int get_eff_addr_modrm(struct insn *insn, struct pt_regs *regs, int *regoff, long *eff_addr)

Type:int

Parameter:

TypeParameterName
struct insn *insn
struct pt_regs *regs
int *regoff
long *eff_addr
932  If addr_bytes != 8 && addr_bytes != 4 Then Return -EINVAL
935  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))
937  If Not nbytes Then Return -EINVAL
940  If X86_MODRM_MOD(value) > 2 Then Return -EINVAL
943  regoff = get_reg_offset(insn, regs, REG_TYPE_RM)
950  If regoff == -EDOM Then
951  If user_64bit_mode(regs) Then tmp = Return frame for iretq + length
953  Else tmp = 0
955  Else if regoff < 0 Then
956  Return -EINVAL
957  Else
958  tmp = 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
961  If addr_bytes == 4 Then
962  addr32 = (tmp & 0xffffffff) + value
964  eff_addr = addr32 & 0xffffffff
965  Else
966  eff_addr = tmp + value
969  Return 0
Caller
NameDescribe
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