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.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'runtime/uprobes/uprobes_x86.c') 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); +} -- cgit