Xen Test Framework
Functions | Variables
main.c File Reference

XSA-196 More...

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

Go to the source code of this file.

Functions

void custom_doublefault_handler (void)
 
 asm (".align 16;" "custom_doublefault_handler:" "mov $(1 << 31 | " STR(X86_EXC_DF) " << 16), %eax;" "iretq;")
 
static unsigned long compat_userspace (void)
 
void test_main (void)
 To be implemented by each test, as its entry point. More...
 

Variables

const char test_title [] = "XSA-196 PoC"
 The title of the test. More...
 
bool test_needs_fep = true
 Boolean indicating whether the test is entirely predicated on the available of the Force Emulation Prefix. More...
 
static const struct xtf_idte idte
 

Detailed Description

XSA-196

Definition in file main.c.

Function Documentation

◆ custom_doublefault_handler()

void custom_doublefault_handler ( void  )

◆ asm()

asm ( ".align 16;" "custom_doublefault_handler:" "mov $  1 << 31 | " STR(X86_EXC_DF) " << 16,
%eax;" "iretq;"   
)

◆ compat_userspace()

static unsigned long compat_userspace ( void  )
static

Definition at line 44 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 74 of file main.c.

+ Here is the call graph for this function:

Variable Documentation

◆ test_title

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

The title of the test.

Definition at line 27 of file main.c.

◆ test_needs_fep

bool test_needs_fep = true

Boolean indicating whether the test is entirely predicated on the available of the Force Emulation Prefix.

Definition at line 29 of file main.c.

◆ idte

const struct xtf_idte idte
static
Initial value:
= {
.cs = __KERN_CS,
}
void custom_doublefault_handler(void)
#define _u(v)
Express an arbitrary value v as unsigned long.
Definition: numbers.h:53

Definition at line 39 of file main.c.