mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-19 13:03:44 +00:00
Frida persistent (#880)
* Added x64 support for persistent mode (function call only), in-memory teest cases and complog * Review changes, fix NeverZero and code to parse the .text section of the main executable. Excluded ranges TBC * Various minor fixes and finished support for AFL_INST_LIBS * Review changes Co-authored-by: Your Name <you@example.com>
This commit is contained in:
committed by
GitHub
parent
8da5cba401
commit
39ad3b8946
@ -3,9 +3,12 @@
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "frida-gum.h"
|
||||
#include "prefetch.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
#include "prefetch.h"
|
||||
#include "stalker.h"
|
||||
|
||||
#define TRUST 0
|
||||
#define PREFETCH_SIZE 65536
|
||||
#define PREFETCH_ENTRIES ((PREFETCH_SIZE - sizeof(size_t)) / sizeof(void *))
|
||||
@ -49,8 +52,9 @@ void prefetch_write(void *addr) {
|
||||
/*
|
||||
* Read the IPC region one block at the time and prefetch it
|
||||
*/
|
||||
void prefetch_read(GumStalker *stalker) {
|
||||
void prefetch_read(void) {
|
||||
|
||||
GumStalker *stalker = stalker_get();
|
||||
if (prefetch_data == NULL) return;
|
||||
|
||||
for (size_t i = 0; i < prefetch_data->count; i++) {
|
||||
@ -68,7 +72,7 @@ void prefetch_read(GumStalker *stalker) {
|
||||
|
||||
}
|
||||
|
||||
void prefetch_init() {
|
||||
void prefetch_init(void) {
|
||||
|
||||
g_assert_cmpint(sizeof(prefetch_data_t), ==, PREFETCH_SIZE);
|
||||
gboolean prefetch = (getenv("AFL_FRIDA_INST_NO_PREFETCH") == NULL);
|
||||
@ -106,16 +110,3 @@ void prefetch_init() {
|
||||
|
||||
}
|
||||
|
||||
__attribute__((noinline)) static void prefetch_activation() {
|
||||
|
||||
asm volatile("");
|
||||
|
||||
}
|
||||
|
||||
void prefetch_start(GumStalker *stalker) {
|
||||
|
||||
gum_stalker_activate(stalker, prefetch_activation);
|
||||
prefetch_activation();
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user