Xen Test Framework
tests
xsa-333
main.c
Go to the documentation of this file.
1
17
#include <xtf.h>
18
19
const
char
test_title
[] =
"XSA-333 PoC"
;
20
21
void
test_main
(
void
)
22
{
23
unsigned
long
val;
24
25
rdmsr_safe
(
MSR_MISC_ENABLE
, &val);
26
27
/*
28
* If Xen is still alive at this point, it didn't take a #GP fault
29
* handling the MSR emulation.
30
*/
31
32
xtf_success
(
"Success: Not vulnerable to XSA-333\n"
);
33
}
34
35
/*
36
* Local variables:
37
* mode: C
38
* c-file-style: "BSD"
39
* c-basic-offset: 4
40
* tab-width: 4
41
* indent-tabs-mode: nil
42
* End:
43
*/
test_main
void test_main(void)
To be implemented by each test, as its entry point.
Definition:
main.c:110
test_title
const char test_title[]
The title of the test.
Definition:
main.c:24
MSR_MISC_ENABLE
#define MSR_MISC_ENABLE
Definition:
msr-index.h:28
rdmsr_safe
static bool rdmsr_safe(uint32_t idx, uint64_t *val)
Wrapper around rdmsr which safely catches #GP[0].
Definition:
msr.h:35
xtf_success
void xtf_success(const char *fmt,...)
Report test success.
Definition:
report.c:38
Generated by
1.9.4