Xen Test Framework
Data Structures | Functions | Variables
main.c File Reference

User-Mode Instruction Prevention More...

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

Go to the source code of this file.

Data Structures

struct  stub
 

Functions

static unsigned long stub_sgdt (unsigned long force)
 
static unsigned long stub_sidt (unsigned long force)
 
static unsigned long stub_sldt (unsigned long force)
 
static unsigned long stub_str (unsigned long force)
 
static unsigned long stub_smsw (unsigned long force)
 
static unsigned long stub_user_sgdt (unsigned long force)
 
static unsigned long stub_user_sidt (unsigned long force)
 
static unsigned long stub_user_sldt (unsigned long force)
 
static unsigned long stub_user_str (unsigned long force)
 
static unsigned long stub_user_smsw (unsigned long force)
 
static void test_insns (bool umip_active, bool force)
 
static void test_umip (bool umip_active)
 
void test_main (void)
 To be implemented by each test, as its entry point. More...
 

Variables

const char test_title [] = "User-Mode Instruction Prevention Tests"
 The title of the test. More...
 
static const struct stub stubs []
 

Detailed Description

User-Mode Instruction Prevention

Definition in file main.c.

Function Documentation

◆ stub_sgdt()

static unsigned long stub_sgdt ( unsigned long  force)
static

Definition at line 19 of file main.c.

+ Here is the call graph for this function:

◆ stub_sidt()

static unsigned long stub_sidt ( unsigned long  force)
static

Definition at line 36 of file main.c.

+ Here is the call graph for this function:

◆ stub_sldt()

static unsigned long stub_sldt ( unsigned long  force)
static

Definition at line 53 of file main.c.

+ Here is the call graph for this function:

◆ stub_str()

static unsigned long stub_str ( unsigned long  force)
static

Definition at line 70 of file main.c.

+ Here is the call graph for this function:

◆ stub_smsw()

static unsigned long stub_smsw ( unsigned long  force)
static

Definition at line 87 of file main.c.

+ Here is the call graph for this function:

◆ stub_user_sgdt()

static unsigned long stub_user_sgdt ( unsigned long  force)
static

Definition at line 104 of file main.c.

+ Here is the call graph for this function:

◆ stub_user_sidt()

static unsigned long stub_user_sidt ( unsigned long  force)
static

Definition at line 121 of file main.c.

+ Here is the call graph for this function:

◆ stub_user_sldt()

static unsigned long stub_user_sldt ( unsigned long  force)
static

Definition at line 138 of file main.c.

+ Here is the call graph for this function:

◆ stub_user_str()

static unsigned long stub_user_str ( unsigned long  force)
static

Definition at line 155 of file main.c.

+ Here is the call graph for this function:

◆ stub_user_smsw()

static unsigned long stub_user_smsw ( unsigned long  force)
static

Definition at line 172 of file main.c.

+ Here is the call graph for this function:

◆ test_insns()

static void test_insns ( bool  umip_active,
bool  force 
)
static

Definition at line 201 of file main.c.

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

◆ test_umip()

static void test_umip ( bool  umip_active)
static

Definition at line 249 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.

Definition at line 257 of file main.c.

+ Here is the call graph for this function:

Variable Documentation

◆ test_title

const char test_title[] = "User-Mode Instruction Prevention Tests"

The title of the test.

Definition at line 17 of file main.c.

◆ stubs

const struct stub stubs[]
static
Initial value:
= {
{ stub_sgdt, stub_user_sgdt, "SGDT" },
{ stub_sidt, stub_user_sidt, "SIDT" },
{ stub_sldt, stub_user_sldt, "SLDT" },
{ stub_str, stub_user_str, "STR" },
{ stub_smsw, stub_user_smsw, "SMSW" },
}
static unsigned long stub_user_str(unsigned long force)
Definition: main.c:155
static unsigned long stub_user_sidt(unsigned long force)
Definition: main.c:121
static unsigned long stub_user_smsw(unsigned long force)
Definition: main.c:172
static unsigned long stub_sldt(unsigned long force)
Definition: main.c:53
static unsigned long stub_sidt(unsigned long force)
Definition: main.c:36
static unsigned long stub_user_sgdt(unsigned long force)
Definition: main.c:104
static unsigned long stub_user_sldt(unsigned long force)
Definition: main.c:138
static unsigned long stub_sgdt(unsigned long force)
Definition: main.c:19
static unsigned long stub_smsw(unsigned long force)
Definition: main.c:87
static unsigned long stub_str(unsigned long force)
Definition: main.c:70