summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorZhang Yanmin <yanmin.zhang@intel.com>2006-01-13 14:45:21 -0800
committerTony Luck <tony.luck@intel.com>2006-01-13 14:45:21 -0800
commitd3ef1f5aafcf7a4129eb2078c70bc9e577bc3af1 (patch)
tree619647d90b0a51d39e80bbc20b59e7e7dccbf510 /include
parente026cca0f2c09c4c28c902db6384fd8a412671d6 (diff)
downloadop-kernel-dev-d3ef1f5aafcf7a4129eb2078c70bc9e577bc3af1.zip
op-kernel-dev-d3ef1f5aafcf7a4129eb2078c70bc9e577bc3af1.tar.gz
[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 <yanmin.zhang@intel.com> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-ia64/kprobes.h6
1 files changed, 6 insertions, 0 deletions
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 */
OpenPOWER on IntegriCloud