From 669bdbfc3aee6d85f4f1b84766a5bfdcb0cc48cf Mon Sep 17 00:00:00 2001 From: Srikar Dronamraju Date: Tue, 28 Oct 2008 17:07:27 -0400 Subject: PR5274: uretprobes fixes, belated commit --- runtime/uprobes/uprobes_x86_64.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'runtime/uprobes/uprobes_x86_64.c') diff --git a/runtime/uprobes/uprobes_x86_64.c b/runtime/uprobes/uprobes_x86_64.c index a681cab5..8cf36623 100644 --- a/runtime/uprobes/uprobes_x86_64.c +++ b/runtime/uprobes/uprobes_x86_64.c @@ -701,3 +701,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->rsp + 4; + else + return (unsigned long) regs->rsp + 8; +} -- cgit