diff options
author | comex | 2015-01-24 21:59:37 -0500 |
---|---|---|
committer | comex | 2015-01-24 21:59:37 -0500 |
commit | 98afb15eaa8f8c31bf5763de0e3c83a845414b0a (patch) | |
tree | e603aae961ead4e596fc994ed06df884eaee7b9a /lib/execmem.h | |
parent | Add function to deal with mprotecting RW and back. A bit more complex than t... (diff) | |
download | substitute-98afb15eaa8f8c31bf5763de0e3c83a845414b0a.tar.gz |
...
Diffstat (limited to 'lib/execmem.h')
-rw-r--r-- | lib/execmem.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/execmem.h b/lib/execmem.h index f46b7d6..a1cd47e 100644 --- a/lib/execmem.h +++ b/lib/execmem.h @@ -1,3 +1,9 @@ #pragma once #include <stdlib.h> +/* write to a foreign page which is already RX / with unknown permissions */ int execmem_write(void *dest, const void *src, size_t len); + +/* for allocating trampolines */ +int execmem_alloc_unsealed(uintptr_t hint, void **page_p, size_t *size_p); +int execmem_seal(void *page); +void execmem_free(void *page); |