Xen Test Framework
Functions | Variables
main.c File Reference

XSA-186 More...

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

Go to the source code of this file.

Functions

void test_int_handler (void)
 
 asm (".align 16;" "test_int_handler:" "movl $0xc0de, %eax;")
 
 asm (".align 16;" "insn_stub_start:;" _ASM_XEN_FEP ".Lstub_fault:;" ".byte 0x67; int $" STR(X86_VEC_AVAIL) ";" ".Lstub_fixup: ret;" "insn_stub_end:;")
 
static bool ex_fault (struct cpu_regs *regs, const struct extable_entry *ex)
 
void test_main (void)
 To be implemented by each test, as its entry point. More...
 

Variables

const char test_title [] = "XSA-186 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-186

Definition in file main.c.

Function Documentation

◆ test_int_handler()

void test_int_handler ( void  )

◆ asm() [1/2]

asm ( ".align 16;" "test_int_handler:" "movl  $0xc0de,
%eax;"   
)

◆ asm() [2/2]

asm ( ".align 16;" "insn_stub_start:;" _ASM_XEN_FEP ".Lstub_fault:;" ".byte 0x67; int $" STR(X86_VEC_AVAIL) ";" ".Lstub_fixup: ret;" "insn_stub_end:;"  )

◆ ex_fault()

static bool ex_fault ( struct cpu_regs *  regs,
const struct extable_entry ex 
)
static

Definition at line 62 of file main.c.

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

+ Here is the call graph for this function:

Variable Documentation

◆ test_title

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

The title of the test.

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

◆ idte

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

Definition at line 47 of file main.c.