XSA-192
More...
#include <xtf.h>
Go to the source code of this file.
|
void | ret_from_vm86 (void) |
|
| asm (".align 16;" "ret_from_vm86:" "mov $" STR(__USER_DS) ", %edx;" "mov %edx, %ds;" "mov %edx, %es;" "mov %edx, %fs;" "mov %edx, %gs;" "mov %dr0, %esp;" "jmp .Ltss_ret_point;") |
|
unsigned long | user_ldt_use (void) |
|
void | test_main (void) |
| To be implemented by each test, as its entry point. More...
|
|
XSA-192
Definition in file main.c.
◆ LDTE
◆ LDT_SEL
◆ ret_from_vm86()
void ret_from_vm86 |
( |
void |
| ) |
|
◆ asm()
asm |
( |
".align 16;" "ret_from_vm86:" "mov $" STR(__USER_DS) " |
, |
|
|
%edx;" "mov % |
edx, |
|
|
%ds;" "mov % |
edx, |
|
|
%es;" "mov % |
edx, |
|
|
%fs;" "mov % |
edx, |
|
|
%gs;" "mov % |
dr0, |
|
|
%esp;" "jmp .Ltss_ret_point;" |
|
|
) |
| |
◆ user_ldt_use()
unsigned long user_ldt_use |
( |
void |
| ) |
|
◆ test_main()
To be implemented by each test, as its entry point.
- Todo:
- Implement better command line infrastructure, but this will do for now.
At the time of writing, Xen doesn't correctly handle invlpg
while running in shadow mode on AMD Gen1 hardware lacking decode assistance. For this test, we simply care that Xen doesn't crash.
Definition at line 82 of file main.c.
◆ test_title
const char test_title[] = "XSA-192 PoC" |
The title of the test.
Definition at line 24 of file main.c.
◆ idte
Initial value:= {
.cs = __KERN_CS,
.dpl = 3,
}
#define _u(v)
Express an arbitrary value v as unsigned long.
Definition at line 39 of file main.c.
◆ vm86_tss
Initial value:=
{
.eip = 0x1000,
.cs = 0,
.ss = 0,
.ss0 = __KERN_DS,
.ldtr = 0,
}
uint8_t boot_stack[3 *PAGE_SIZE]
#define X86_TSS_INVALID_IO_BITMAP
Definition at line 46 of file main.c.