42#define GATE_SEL (0x1000 | X86_SEL_LDT | 3)
64 const char *vendor_ptr =
_p(&ptr);
78 [ptr]
"m" (*vendor_ptr),
100 void *
volatile ptr = gate;
120 return xtf_failure(
"Fail: vulnerable to XSA-298\n");
123 return xtf_success(
"Success: Not vulnerable to XSA-298\n");
126 return xtf_failure(
"Fail: Unexpected return value %#x\n", res);
bool ex_record_fault_eax(struct cpu_regs *regs, const struct extable_entry *ex)
Record the current fault in %eax.
void test_main(void)
To be implemented by each test, as its entry point.
const char test_title[]
The title of the test.
#define EXINFO_SYM(exc, ec)
static long hypercall_update_va_mapping(unsigned long linear, uint64_t npte, enum XEN_UVMF flags)
#define _ASM_EXTABLE_HANDLER(fault, fixup, handler)
Create an exception table entry with custom handler.
static unsigned long exec_user(unsigned long(*fn)(void))
static void exec_user_void(void(*fn)(void))
#define IS_DEFINED(x)
Evalute whether the CONFIG_ token x is defined.
#define _p(v)
Express an abitrary integer v as void *.
#define _u(v)
Express an arbitrary value v as unsigned long.
intpte_t pte_from_virt(const void *va, uint64_t flags)
void xtf_failure(const char *fmt,...)
Report a test failure.
void xtf_success(const char *fmt,...)
Report test success.
#define PF_SYM(...)
Create pagetable entry flags based on mnemonics.
static void pack_call_gate(env_gate *g, unsigned int sel, unsigned long offset, unsigned int dpl, unsigned int other)
unsigned int gate_target(void)
static int remap_linear(const void *linear, uint64_t flags)
static unsigned long user2(void)