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

Name:solve_seg_reg() - obtain segment register index*@insn: Instruction with operands*@regs: Register values as seen when entering kernel mode*@regoff: Operand offset, in pt_regs, used to deterimine segment register* Determine the segment register associated

Proto:static int resolve_seg_reg(struct insn *insn, struct pt_regs *regs, int regoff)

Type:int

Parameter:

TypeParameterName
struct insn *insn
struct pt_regs *regs
intregoff
268  If regoff == offsetof(structpt_regs, ip) Then
269  If user_64bit_mode(regs) Then Return Identifiers for segment registers
271  Else Return INAT_SEG_REG_CS
275  If Not insn Then Return -EINVAL
278  If Not heck_seg_overrides() - check if segment override prefixes are allowed*@insn: Valid instruction with segment override prefixes*@regoff: Operand offset, in pt_regs, for which the check is performed* For a particular register used in register-indirect Then Return solve_default_seg() - resolve default segment register index for an operand*@insn: Instruction with opcode and address size
281  idx = get_seg_reg_override_idx() - obtain segment register override index*@insn: Valid instruction with segment override prefixes* Inspect the instruction prefixes in @insn and find segment overrides, if any
282  If idx < 0 Then Return idx
285  If idx == INAT_SEG_REG_DEFAULT Then Return solve_default_seg() - resolve default segment register index for an operand*@insn: Instruction with opcode and address size
292  If user_64bit_mode(regs) Then
293  If idx != INAT_SEG_REG_FS && idx != INAT_SEG_REG_GS Then idx = Identifiers for segment registers
298  Return idx
Caller
NameDescribe
get_seg_base_limitget_seg_base_limit() - obtain base address and limit of a segment*@insn: Instruction