This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[RFC] [PATCH 2.6.37-rc5-tip 9/20] 9: x86: architecture specific task information.
- From: Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>
- To: Peter Zijlstra <peterz at infradead dot org>, Ingo Molnar <mingo at elte dot hu>
- Cc: Steven Rostedt <rostedt at goodmis dot org>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>, Arnaldo Carvalho de Melo <acme at infradead dot org>, Linus Torvalds <torvalds at linux-foundation dot org>, Andi Kleen <andi at firstfloor dot org>, Christoph Hellwig <hch at infradead dot org>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>, Oleg Nesterov <oleg at redhat dot com>, Andrew Morton <akpm at linux-foundation dot org>, Linux-mm <linux-mm at vger dot kernel dot org>, Jim Keniston <jkenisto at linux dot vnet dot ibm dot com>, Frederic Weisbecker <fweisbec at gmail dot com>, SystemTap <systemtap at sources dot redhat dot com>, LKML <linux-kernel at vger dot kernel dot org>, "Paul E. McKenney" <paulmck at linux dot vnet dot ibm dot com>
- Date: Thu, 16 Dec 2010 15:28:58 +0530
- Subject: [RFC] [PATCH 2.6.37-rc5-tip 9/20] 9: x86: architecture specific task information.
- References: <20101216095714.23751.52601.sendpatchset@localhost6.localdomain6>
On X86_64, we need to support rip relative instructions.
Rip relative instructions are handled by saving the scratch register
on probe hit and then retrieving the previously saved scratch register
after single-step. This value stored at probe hit is specific to each
task. Hence this is implemented as part of uprobe_task_arch_info.
Since x86_32 has no support for rip relative instructions, we dont need to
bother for x86_32.
Signed-off-by: Jim Keniston <jkenisto@linux.vnet.ibm.com>
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
---
arch/x86/include/asm/uprobes.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/uprobes.h b/arch/x86/include/asm/uprobes.h
index 0063207..e38950f 100644
--- a/arch/x86/include/asm/uprobes.h
+++ b/arch/x86/include/asm/uprobes.h
@@ -34,8 +34,13 @@ typedef u8 uprobe_opcode_t;
struct uprobe_arch_info {
unsigned long rip_rela_target_address;
};
+
+struct uprobe_task_arch_info {
+ unsigned long saved_scratch_register;
+};
#else
struct uprobe_arch_info {};
+struct uprobe_task_arch_info {};
#endif
struct uprobe;
extern int analyze_insn(struct task_struct *tsk, struct uprobe *uprobe);