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

Name:get_seg_limit() - Obtain the limit of a segment descriptor*@regs: Register values as seen when entering kernel mode*@seg_reg_idx: Index of the segment register pointing to seg descriptor* Obtain the limit of the segment as indicated by the segment

Proto:static unsigned long get_seg_limit(struct pt_regs *regs, int seg_reg_idx)

Type:unsigned long

Parameter:

TypeParameterName
struct pt_regs *regs
intseg_reg_idx
702  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
703  If sel < 0 Then Return 0
706  If user_64bit_mode(regs) || v8086_mode(regs) Then Return -1L
709  If Not sel Then Return 0
712  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 0
721  limit = get_desc_limit( & desc)
722  If g Then limit = (limit << 12) + 0xfff
725  Return limit
Caller
NameDescribe
get_seg_base_limitget_seg_base_limit() - obtain base address and limit of a segment*@insn: Instruction