diff options
author | Yifan Lu | 2016-10-08 14:03:00 -0700 |
---|---|---|
committer | Yifan Lu | 2016-10-08 14:03:00 -0700 |
commit | 750b4eb89e8504ef7ec88528538e0c92fc06678a (patch) | |
tree | 72dda33aa6d51e29b0494ed3f6025d5be9b07ffd /lib/execmem.h | |
parent | Support using a different VMA for the hook dest (diff) | |
download | substitute-750b4eb89e8504ef7ec88528538e0c92fc06678a.tar.gz |
Added support for platform specific aux data to execmem
Diffstat (limited to 'lib/execmem.h')
-rw-r--r-- | lib/execmem.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/execmem.h b/lib/execmem.h index 8817f38..07e9fa4 100644 --- a/lib/execmem.h +++ b/lib/execmem.h @@ -1,9 +1,9 @@ #pragma once #include <sys/types.h> /* For allocating trampolines - this is just a mmap wrapper. */ -int execmem_alloc_unsealed(uintptr_t hint, void **page_p, uintptr_t *vma_p, size_t *size_p); -int execmem_seal(void *page); -void execmem_free(void *page); +int execmem_alloc_unsealed(uintptr_t hint, void **page_p, uintptr_t *vma_p, size_t *size_p, void *opt); +int execmem_seal(void *page, void *opt); +void execmem_free(void *page, void *opt); /* Write to "foreign" (i.e. owned by another library, not out-of-process) pages * which are already RX or have unknown permissions. @@ -15,6 +15,7 @@ struct execmem_foreign_write { void *dst; const void *src; size_t len; + void *opt; }; typedef uintptr_t (*execmem_pc_patch_callback)(void *ctx, uintptr_t pc); int execmem_foreign_write_with_pc_patch(struct execmem_foreign_write *writes, |