From d3ef1f5aafcf7a4129eb2078c70bc9e577bc3af1 Mon Sep 17 00:00:00 2001 From: Zhang Yanmin Date: Fri, 13 Jan 2006 14:45:21 -0800 Subject: [IA64] prevent accidental modification of args in jprobe handler When jprobe is hit, the function parameters of the original function should be saved before jprobe handler is executed, and restored it after jprobe handler is executed, because jprobe handler might change the register values due to tail call optimization by the gcc. Signed-off-by: Zhang Yanmin Signed-off-by: Anil S Keshavamurthy Signed-off-by: Tony Luck --- include/asm-ia64/kprobes.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h index a74b681..8c0fc22 100644 --- a/include/asm-ia64/kprobes.h +++ b/include/asm-ia64/kprobes.h @@ -68,10 +68,14 @@ struct prev_kprobe { unsigned long status; }; +#define MAX_PARAM_RSE_SIZE (0x60+0x60/0x3f) /* per-cpu kprobe control block */ struct kprobe_ctlblk { unsigned long kprobe_status; struct pt_regs jprobe_saved_regs; + unsigned long jprobes_saved_stacked_regs[MAX_PARAM_RSE_SIZE]; + unsigned long *bsp; + unsigned long cfm; struct prev_kprobe prev_kprobe; }; @@ -118,5 +122,7 @@ extern int kprobe_exceptions_notify(struct notifier_block *self, static inline void jprobe_return(void) { } +extern void invalidate_stacked_regs(void); +extern void flush_register_stack(void); #endif /* _ASM_KPROBES_H */ -- cgit v1.1