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

Name:sn_get_code_seg_params() - Obtain code segment parameters*@regs: Structure with register values as seen when entering kernel mode* Obtain address and operand sizes of the code segment. It is obtained from the* selector contained in the CS register in regs

Proto:int insn_get_code_seg_params(struct pt_regs *regs)

Type:int

Parameter:

TypeParameterName
struct pt_regs *regs
749  If v8086_mode(regs) Then Return INSN_CODE_SEG_PARAMS(2, 2)
753  sel = get_segment_selector() - obtain segment selector*@regs: Register values as seen when entering kernel mode*@seg_reg_idx: Segment register index to use* Obtain the segment selector from any of the CS, SS, DS, ES, FS, GS segment* registers
754  If sel < 0 Then Return sel
757  If Not get_desc() - Obtain contents of a segment descriptor*@out: Segment descriptor contents on success*@sel: Segment selector* Given a segment selector, obtain a pointer to the segment descriptor Then Return -EINVAL
765  If Not (type & BIT(3)) Then Return -EINVAL
772  Case | == 0
773  Return INSN_CODE_SEG_PARAMS(2, 2)
777  Case | == 1
778  Return INSN_CODE_SEG_PARAMS(4, 4)
782  Case | == 2
783  Return INSN_CODE_SEG_PARAMS(4, 8)
784  Case | == 3
786  Default
787  Return -EINVAL