diff options
Diffstat (limited to 'runtime/uprobes/uprobes_x86.c')
-rw-r--r-- | runtime/uprobes/uprobes_x86.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/uprobes/uprobes_x86.c b/runtime/uprobes/uprobes_x86.c index 05d2a978..e3bdf8ff 100644 --- a/runtime/uprobes/uprobes_x86.c +++ b/runtime/uprobes/uprobes_x86.c @@ -716,3 +716,13 @@ unsigned long arch_hijack_uret_addr(unsigned long trampoline_address, } return orig_ret_addr; } + +static +unsigned long arch_predict_sp_at_ret(struct pt_regs *regs, + struct task_struct *tsk) +{ + if (test_tsk_thread_flag(tsk, TIF_IA32)) + return (unsigned long) (REGS_SP + 4); + else + return (unsigned long) (REGS_SP + 8); +} |