From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753465Ab1KOIJ4 (ORCPT ); Tue, 15 Nov 2011 03:09:56 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:54109 "EHLO e1.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752146Ab1KOIJz (ORCPT ); Tue, 15 Nov 2011 03:09:55 -0500 Date: Tue, 15 Nov 2011 13:14:06 +0530 From: Srikar Dronamraju To: Oleg Nesterov Cc: Peter Zijlstra , Linus Torvalds , Andrew Morton , LKML , Linux-mm , Ingo Molnar , Andi Kleen , Christoph Hellwig , Steven Rostedt , Roland McGrath , Thomas Gleixner , Masami Hiramatsu , Arnaldo Carvalho de Melo , Anton Arapov , Ananth N Mavinakayanahalli , Jim Keniston , Stephen Wilson Subject: Re: [PATCH v6 3.2-rc1 28/28] uprobes: introduce UTASK_SSTEP_TRAPPED logic Message-ID: <20111115074406.GE4243@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <20111110183725.11361.57827.sendpatchset@srdronam.in.ibm.com> <20111110184307.11361.8163.sendpatchset@srdronam.in.ibm.com> <20111114163953.GA29399@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20111114163953.GA29399@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) x-cbid: 11111508-6078-0000-0000-00000466C387 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > +void __weak abort_xol(struct pt_regs *regs, struct uprobe_task *utask) > > +{ > > + set_instruction_pointer(regs, utask->vaddr); > > +} > > OK, this is fine on 32bit. But X86_64 should also handle > UPROBES_FIX_RIP_AX/CX? > > IOW, shouldn't we also do > > if (uprobe->fixups & UPROBES_FIX_RIP_AX) > regs->ax = tskinfo->saved_scratch_register; > else if (uprobe->fixups & UPROBES_FIX_RIP_CX) > regs->cx = tskinfo->saved_scratch_register; > > on 64bit? Yes, we should be doing this on x86_64. Since abort_xol is a weak function, I will have x86_64 specific abort_xol. -- Thanks and Regards Srikar