11 #define PAGE_RW 0x02ULL 12 #define PAGE_NX 0x8000000000000000ULL 22 void *mod_ptr = _data.func.module_alloc(_data.args.module_alloc_size);
23 void *vm_ptr = _data.func.vmalloc(_data.args.vmalloc_size);
24 unsigned long ptr = 0;
29 ptr = (
unsigned long)(mod_ptr);
30 ret = _data.func.change_page_attr_set_clr(&ptr, 0x1,
PAGE_NX,
PAGE_RW, 0, 0, 0);
37 ptr = (
unsigned long)((
unsigned long)(mod_ptr) +
PAGE_SIZE);
38 ret = _data.func.change_page_attr_set_clr(&ptr, 0x2, 0,
PAGE_NX |
PAGE_RW, 0, 0, 0);
static __default_fn_attr unsigned long breakpoint(unsigned long token)
Generate INT3 instruction for hypercall.
__fn_naked void trampoline(void)
The trampoline of the agent.
__default_fn_attr void init(void)
Allocates memory for detours and agents.
struct data _data __aligned(1)
The section used for this agent is .adata'.
#define __exit
Generates the exit asm-code for agents.
#define breakpoint_1(token, p1)
Hypercall using 1 argument.
#define __default_fn_attr
#define breakpoint_2(token, p1, p2)
Hypercall using 2 argument.