From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24166 invoked by alias); 14 Mar 2011 13:41:40 -0000 Received: (qmail 24159 invoked by uid 22791); 14 Mar 2011 13:41:40 -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 e28smtp07.in.ibm.com (HELO e28smtp07.in.ibm.com) (122.248.162.7) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Mar 2011 13:41:35 +0000 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by e28smtp07.in.ibm.com (8.14.4/8.13.1) with ESMTP id p2EDfVT3016653 for ; Mon, 14 Mar 2011 19:11:31 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p2EDfUVq1134604 for ; Mon, 14 Mar 2011 19:11:30 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p2EDfTfd021955 for ; Mon, 14 Mar 2011 19:11:32 +0530 Received: from localhost6.localdomain6 ([9.124.31.43]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p2EDfTfM021947; Mon, 14 Mar 2011 19:11:29 +0530 From: Srikar Dronamraju To: Peter Zijlstra , Ingo Molnar Cc: Steven Rostedt , Srikar Dronamraju , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Christoph Hellwig , Masami Hiramatsu , Ananth N Mavinakayanahalli , Oleg Nesterov , LKML , SystemTap , Jim Keniston , Roland McGrath , Andi Kleen , Andrew Morton , "Paul E. McKenney" Date: Mon, 14 Mar 2011 13:41:00 -0000 Message-Id: <20110314133550.27435.62287.sendpatchset@localhost6.localdomain6> In-Reply-To: <20110314133403.27435.7901.sendpatchset@localhost6.localdomain6> References: <20110314133403.27435.7901.sendpatchset@localhost6.localdomain6> Subject: [PATCH v2 2.6.38-rc8-tip 9/20] 9: 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-q1/txt/msg00359.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);