函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\umip.c Create Date:2022-07-27 09:49:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:mulate_umip_insn() - Emulate UMIP instructions and return dummy values*@insn: Instruction structure with operands*@umip_inst: A constant indicating the instruction to emulate*@data: Buffer into which the dummy result is stored*@data_size: Size of the

函数原型:static int emulate_umip_insn(struct insn *insn, int umip_inst, unsigned char *data, int *data_size, bool x86_64)

返回类型:int

参数:

类型参数名称
struct insn *insn
intumip_inst
unsigned char *data
int *data_size
boolx86_64
207  如果非data或非data_size或非insn则返回:负EINVAL
218  如果umip_inst恒等于0F 01 /0 umip_inst恒等于0F 01 /1
220  dummy_limit等于0
223  如果X86_MODRM_MOD(value)恒等于3则返回:负EINVAL
226  如果umip_inst恒等于0F 01 /0 dummy_base_addr等于DOC: Emulation for User-Mode Instruction Prevention (UMIP)* User-Mode Instruction Prevention is a security feature present in recent* x86 processors that, when enabled, prevents a group of instructions (SGDT,* SIDT, SLDT, SMSW and STR) from being run in
228  否则dummy_base_addr等于UMIP_DUMMY_IDT_BASE
237  如果x86_64data_size等于The SGDT and SIDT instructions store the contents of the global descriptor* table and interrupt table registers, respectively. The destination is a* memory operand of X+2 bytes. X bytes are used to store the base address of
239  否则data_size等于UMIP_GDT_IDT_BASE_SIZE_32BIT
242  memcpy(data + 2, & dummy_base_addr, * data_size)
244  data_size加等于UMIP_GDT_IDT_LIMIT_SIZE
245  memcpy(data, & dummy_limit, UMIP_GDT_IDT_LIMIT_SIZE)
247  否则如果umip_inst恒等于0F 01 /4
248  dummy_value等于CR0_STATE
258  如果X86_MODRM_MOD(value)恒等于3则data_size等于opnd_bytes
260  否则data_size等于2
263  memcpy(data, & dummy_value, * data_size)
265  否则
266  返回:负EINVAL
269  返回:0
调用者
名称描述
fixup_umip_exceptionxup_umip_exception() - Fixup a general protection fault caused by UMIP*@regs: Registers as saved when entering the #GP handler* The instructions SGDT, SIDT, STR, SMSW and SLDT cause a general protection* fault if executed with CPL > 0 (i