Xen Test Framework
main.c
Go to the documentation of this file.
1
15#include <xtf.h>
16
17const char test_title[] = "XSA-472-1 PoC";
18
19#define HV_X64_MSR_REFERENCE_TSC 0x40000021
20
21void test_main(void)
22{
23 /* Test if HV_X64_MSR_REFERENCE_TSC checks for valid mapping. */
25
26 /*
27 * If we're still alive here, Xen didn't crash, so the NULL pointer
28 * dereference is not present.
29 */
30 xtf_success("Success: Not vulnerable to XSA-470 (CVE-2025-27466)\n");
31}
32
33/*
34 * Local variables:
35 * mode: C
36 * c-file-style: "BSD"
37 * c-basic-offset: 4
38 * tab-width: 4
39 * indent-tabs-mode: nil
40 * End:
41 */
void test_main(void)
To be implemented by each test, as its entry point.
Definition: main.c:301
const char test_title[]
The title of the test.
Definition: main.c:13
static void wrmsr(uint32_t idx, uint64_t val)
Thin wrapper around an wrmsr instruction.
Definition: msr.h:55
void xtf_success(const char *fmt,...)
Report test success.
Definition: report.c:38
#define HV_X64_MSR_REFERENCE_TSC
Definition: main.c:19