From 0617b8898a3172dec88b94751ea70c149a075c36 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 10 Jun 2024 18:16:30 +0100 Subject: Update comment --- frida_mode/src/persistent/persistent_x64.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'frida_mode/src') 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. -- cgit 1.4.1