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

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

Proto:static void __user *get_addr_ref_32(struct insn *insn, struct pt_regs *regs)

Type:void

Parameter:

TypeParameterName
struct insn *insn
struct pt_regs *regs
1207  linear_addr = -1L
1212  If addr_bytes != 4 Then Go to out
1215  If X86_MODRM_MOD(value) == 3 Then
1216  ret = get_eff_addr_reg() - Obtain effective address from register operand*@insn: Instruction
1217  If ret Then Go to out
1220  eff_addr = tmp
1222  Else
1223  If nbytes Then
1225  If ret Then Go to out
1228  eff_addr = tmp
1229  Else
1231  If ret Then Go to out
1234  eff_addr = tmp
1238  ret = get_seg_base_limit() - obtain base address and limit of a segment*@insn: Instruction
1239  If ret Then Go to out
1253  If Not user_64bit_mode(regs) && eff_addr > seg_limit Then Go to out
1260  If v8086_mode(regs) && eff_addr & ~0xffff Then Go to out
1268  linear_addr = (eff_addr & 0xffffffff) + seg_base
1271  If v8086_mode(regs) Then linear_addr &= 0xfffff
1274  out :
1275  Return linear_addr
Caller
NameDescribe
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