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:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static int get_reg_offset_16(struct insn *insn, struct pt_regs *regs, int *offs1, int *offs2)

Type:int

Parameter:

TypeParameterName
struct insn *insn
struct pt_regs *regs
int *offs1
int *offs2
510  static const int regoff1[] = {offsetof(structpt_regs, bx), offsetof(structpt_regs, bx), offsetof(structpt_regs, bp), offsetof(structpt_regs, bp), offsetof(structpt_regs, si), offsetof(structpt_regs, di), offsetof(structpt_regs, bp), offsetof(structpt_regs, bx), }
521  static const int regoff2[] = {offsetof(structpt_regs, si), offsetof(structpt_regs, di), offsetof(structpt_regs, si), offsetof(structpt_regs, di), - EDOM, - EDOM, - EDOM, - EDOM, }
532  If Not offs1 || Not offs2 Then Return -EINVAL
536  If X86_MODRM_MOD(value) == 3 Then
537  offs1 = sn_get_modrm_rm_off() - Obtain register in r/m part of the ModRM byte*@insn: Instruction containing the ModRM byte*@regs: Register values as seen when entering kernel mode* Returns:* The register indicated by the r/m part of the ModRM byte. The
538  offs2 = -EDOM
539  Return 0
542  offs1 = regoff1[X86_MODRM_RM(value)]
543  offs2 = regoff2[X86_MODRM_RM(value)]
552  If X86_MODRM_MOD(value) == 0 && X86_MODRM_RM(value) == 6 Then offs1 = -EDOM
556  Return 0
Caller
NameDescribe
get_eff_addr_modrm_16get_eff_addr_modrm_16() - Obtain referenced effective address via ModRM*@insn: Instruction