about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--frida_mode/src/persistent/persistent_x64.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/frida_mode/src/persistent/persistent_x64.c b/frida_mode/src/persistent/persistent_x64.c
index 0f87da0d..fd194c75 100644
--- a/frida_mode/src/persistent/persistent_x64.c
+++ b/frida_mode/src/persistent/persistent_x64.c
@@ -17,7 +17,6 @@ typedef struct {
 } persistent_ctx_t;
 
 static persistent_ctx_t saved_regs = {0};
-static gpointer         saved_ret = NULL;
 static gpointer         persistent_loop = NULL;
 
 gboolean persistent_is_supported(void) {
@@ -245,21 +244,19 @@ static void instrument_persitent_save_ret(GumX86Writer *cw) {
 void persistent_prologue_arch(GumStalkerOutput *output) {
 
   /*
-   *  SAVE RET
-   *  POP RET
+   *  SAVE RET (Used to write the epilogue if persistent_ret is not set)
    *  SAVE REGS
-   * loop:
+   * loop: (Save address of where the eiplogue should jump back to)
    *  CALL instrument_afl_persistent_loop
-   *  TEST EAX, EAX
-   *  JZ end:
-   *  call hook (optionally)
+   *  CALL hook (optionally)
    *  RESTORE REGS
-   *  push ret = loop;
    *  INSTRUMENTED PERSISTENT FUNC
    */
 
   GumX86Writer *cw = output->writer.x86;
 
+  FVERBOSE("Persistent loop reached");
+
   /*
    * If we haven't set persistent_ret, then assume that we are dealing with a
    * function and we should loop when that function returns.