From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25409 invoked by alias); 1 Apr 2011 14:44:17 -0000 Received: (qmail 25399 invoked by uid 22791); 1 Apr 2011 14:44:16 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e23smtp07.au.ibm.com (HELO e23smtp07.au.ibm.com) (202.81.31.140) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Apr 2011 14:44:12 +0000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp07.au.ibm.com (8.14.4/8.13.1) with ESMTP id p31EiAfB017120 for ; Sat, 2 Apr 2011 01:44:10 +1100 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p31EiAZF2314324 for ; Sat, 2 Apr 2011 01:44:10 +1100 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p31Ei8C1009389 for ; Sat, 2 Apr 2011 01:44:10 +1100 Received: from localhost6.localdomain6 ([9.124.31.43]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p31Ei3fY009271; Sat, 2 Apr 2011 01:44:04 +1100 From: Srikar Dronamraju To: Peter Zijlstra , Ingo Molnar Cc: Steven Rostedt , Srikar Dronamraju , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Andi Kleen , Christoph Hellwig , Jonathan Corbet , Thomas Gleixner , Masami Hiramatsu , Oleg Nesterov , Andrew Morton , SystemTap , Jim Keniston , Roland McGrath , Ananth N Mavinakayanahalli , LKML Date: Fri, 01 Apr 2011 14:44:00 -0000 Message-Id: <20110401143427.15455.25519.sendpatchset@localhost6.localdomain6> In-Reply-To: <20110401143223.15455.19844.sendpatchset@localhost6.localdomain6> References: <20110401143223.15455.19844.sendpatchset@localhost6.localdomain6> Subject: [PATCH v3 2.6.39-rc1-tip 10/26] 10: x86: architecture specific task information. X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q2/txt/msg00018.txt.bz2 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 Signed-off-by: Srikar Dronamraju --- 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);