diff options
| author | Your Name <you@example.com> | 2022-02-18 17:39:21 +0000 |
|---|---|---|
| committer | Your Name <you@example.com> | 2022-02-18 17:39:21 +0000 |
| commit | 852c036cae97113daac3ba5a791554bbbd5c8903 (patch) | |
| tree | c2cd8c1bba32d5ca5e17d74dcd97e1bf6f7e589b /frida_mode/include | |
| parent | a5943dc782d1a6047aaa8f455ab37e4a31369311 (diff) | |
| download | afl++-852c036cae97113daac3ba5a791554bbbd5c8903.tar.gz | |
Add global caching of block translation to instrumentation
Diffstat (limited to 'frida_mode/include')
| -rw-r--r-- | frida_mode/include/instrument.h | 8 | ||||
| -rw-r--r-- | frida_mode/include/util.h | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/frida_mode/include/instrument.h b/frida_mode/include/instrument.h index 20312a4b..4a54ee22 100644 --- a/frida_mode/include/instrument.h +++ b/frida_mode/include/instrument.h @@ -22,6 +22,9 @@ extern uint32_t __afl_map_size; extern __thread guint64 *instrument_previous_pc_addr; +extern gboolean instrument_cache_enabled; +extern gsize instrument_cache_size; + void instrument_config(void); void instrument_init(void); @@ -59,5 +62,10 @@ void instrument_on_fork(void); guint64 instrument_get_offset_hash(GumAddress current_rip); +void instrument_cache_config(void); +void instrument_cache_init(void); +void instrument_cache_insert(gpointer real_address, gpointer code_address); +void instrument_cache(const cs_insn *instr, GumStalkerOutput *output); + #endif diff --git a/frida_mode/include/util.h b/frida_mode/include/util.h index bd37687c..b04e0a26 100644 --- a/frida_mode/include/util.h +++ b/frida_mode/include/util.h @@ -5,6 +5,14 @@ #include "debug.h" +#ifndef MAP_FIXED_NOREPLACE + #ifdef MAP_EXCL + #define MAP_FIXED_NOREPLACE MAP_EXCL | MAP_FIXED + #else + #define MAP_FIXED_NOREPLACE MAP_FIXED + #endif +#endif + #define UNUSED_PARAMETER(x) (void)(x) #define IGNORED_RETURN(x) (void)!(x) |
