diff options
author | van Hauser <vh@thc.org> | 2020-06-09 19:25:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-09 19:25:09 +0200 |
commit | 12bdefe00e38cdc3dd8cb028eeac325ab2e94e16 (patch) | |
tree | 0d321d362a19ff19a4a98dcd1b9b72601945695f /qemu_mode/patches/afl-qemu-common.h | |
parent | 748238d6ab4aeb7f34958d4c37c5ef200ad22463 (diff) | |
parent | 81829d132bebcb42c0e289bb5788b8f2b29c1599 (diff) | |
download | afl++-12bdefe00e38cdc3dd8cb028eeac325ab2e94e16.tar.gz |
Merge pull request #392 from AFLplusplus/dev
Push to master
Diffstat (limited to 'qemu_mode/patches/afl-qemu-common.h')
-rw-r--r-- | qemu_mode/patches/afl-qemu-common.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qemu_mode/patches/afl-qemu-common.h b/qemu_mode/patches/afl-qemu-common.h index 057e1b62..6fac32ef 100644 --- a/qemu_mode/patches/afl-qemu-common.h +++ b/qemu_mode/patches/afl-qemu-common.h @@ -54,7 +54,7 @@ #if (defined(__x86_64__) || defined(__i386__)) && defined(AFL_QEMU_NOT_ZERO) #define INC_AFL_AREA(loc) \ asm volatile( \ - "incb (%0, %1, 1)\n" \ + "addb $1, (%0, %1, 1)\n" \ "adcb $0, (%0, %1, 1)\n" \ : /* no out */ \ : "r"(afl_area_ptr), "r"(loc) \ @@ -63,7 +63,9 @@ #define INC_AFL_AREA(loc) afl_area_ptr[loc]++ #endif -typedef void (*afl_persistent_hook_fn)(uint64_t *regs, uint64_t guest_base); +typedef void (*afl_persistent_hook_fn)(uint64_t *regs, uint64_t guest_base, + uint8_t *input_buf, + uint32_t input_buf_len); /* Declared in afl-qemu-cpu-inl.h */ @@ -81,6 +83,10 @@ extern unsigned char persistent_save_gpr; extern uint64_t persistent_saved_gpr[AFL_REGS_NUM]; extern int persisent_retaddr_offset; +extern u8 * shared_buf; +extern u32 *shared_buf_len; +extern u8 sharedmem_fuzzing; + extern afl_persistent_hook_fn afl_persistent_hook_ptr; extern __thread abi_ulong afl_prev_loc; |