Xen Test Framework
Macros | Functions | Variables
main.c File Reference

XSA-298 More...

#include <xtf.h>
+ Include dependency graph for main.c:

Go to the source code of this file.

Macros

#define GATE_SEL   (0x1000 | X86_SEL_LDT | 3)
 

Functions

unsigned int gate_target (void)
 
 asm ("gate_target:;" "mov %cs, %eax;")
 
static void user1 (void)
 
static unsigned long user2 (void)
 
static int remap_linear (const void *linear, uint64_t flags)
 
void test_main (void)
 To be implemented by each test, as its entry point. More...
 

Variables

const char test_title [] = "XSA-298 PoC"
 The title of the test. More...
 

Detailed Description

XSA-298

Definition in file main.c.

Macro Definition Documentation

◆ GATE_SEL

#define GATE_SEL   (0x1000 | X86_SEL_LDT | 3)

Definition at line 42 of file main.c.

Function Documentation

◆ gate_target()

unsigned int gate_target ( void  )
+ Here is the caller graph for this function:

◆ asm()

asm ( "gate_target:;" "mov %  cs,
%eax;"   
)

◆ user1()

static void user1 ( void  )
static

Definition at line 50 of file main.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ user2()

static unsigned long user2 ( void  )
static

Definition at line 57 of file main.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remap_linear()

static int remap_linear ( const void *  linear,
uint64_t  flags 
)
static

Definition at line 85 of file main.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ test_main()

void test_main ( void  )

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 92 of file main.c.

+ Here is the call graph for this function:

Variable Documentation

◆ test_title

const char test_title[] = "XSA-298 PoC"

The title of the test.

Definition at line 40 of file main.c.