Function report |
Source Code:arch\x86\kernel\umip.c |
Create Date:2022-07-28 08:50:39 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:xup_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
Proto:bool fixup_umip_exception(struct pt_regs *regs)
Type:bool
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct pt_regs * | regs |
| 321 | seg_base = 0 |
| 323 | unsigned char dummy_data[10] = {0} |
| 329 | If Not regs Then Return false |
| 338 | If Not user_64bit_mode(regs) Then seg_base = sn_get_seg_base() - Obtain base address of segment descriptor |
| 341 | If seg_base == -1L Then Return false |
| 344 | not_copied = copy_from_user(buf, (void__user * )(seg_base + Return frame for iretq ), size of buf ) |
| 346 | nr_copied = size of buf - not_copied |
| 353 | If Not nr_copied Then Return false |
| 379 | umip_inst = dentify_insn() - Identify a UMIP-protected instruction*@insn: Instruction structure with opcode and ModRM byte |
| 380 | If umip_inst < 0 Then Return false |
| 383 | umip_pr_warn(regs, "%s instruction cannot be used by applications.\n", umip_insns[umip_inst]) |
| 390 | umip_pr_warn(regs, "For now, expensive software emulation returns the result.\n") |
| 402 | If X86_MODRM_MOD(value) == 3 Then |
| 410 | If reg_offset < 0 Then Return false |
| 413 | reg_addr = regs + reg_offset |
| 414 | memcpy(reg_addr, dummy_data, dummy_data_size) |
| 415 | Else |
| 417 | If uaddr == -1L Then Return false |
| 420 | nr_copied = copy_to_user(uaddr, dummy_data, dummy_data_size) |
| 421 | If nr_copied > 0 Then |
| 432 | Return frame for iretq += length |
| 433 | Return true |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |