From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6651 invoked by alias); 18 Mar 2011 19:10:56 -0000 Received: (qmail 6644 invoked by uid 22791); 18 Mar 2011 19:10:55 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from toast.topped-with-meat.com (HELO topped-with-meat.com) (168.75.111.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Mar 2011 19:10:50 +0000 Received: by topped-with-meat.com (Postfix, from userid 5281) id 4BAF12C183; Fri, 18 Mar 2011 12:10:47 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Srikar Dronamraju X-Fcc: ~/Mail/lkml Cc: Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Andi Kleen , Christoph Hellwig , Masami Hiramatsu , Oleg Nesterov , Andrew Morton , SystemTap , Jim Keniston , Ananth N Mavinakayanahalli , LKML , "Paul E. McKenney" Subject: Re: [PATCH v2 2.6.38-rc8-tip 6/20] 6: x86: analyze instruction and determine fixups. In-Reply-To: Srikar Dronamraju's message of Saturday, 19 March 2011 00:19:22 +0530 <20110318184922.GA31152@linux.vnet.ibm.com> References: <20110314133403.27435.7901.sendpatchset@localhost6.localdomain6> <20110314133507.27435.71382.sendpatchset@localhost6.localdomain6> <20110318182457.GA24048@linux.vnet.ibm.com> <20110318183629.2AB052C286@topped-with-meat.com> <20110318184922.GA31152@linux.vnet.ibm.com> Message-Id: <20110318191047.4BAF12C183@topped-with-meat.com> Date: Fri, 18 Mar 2011 19:10:00 -0000 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.0 cv=K6VZ71qI c=1 sm=1 a=WaHTwlwe2vUA:10 a=kj9zAlcOel0A:10 a=8PYZixKV93lXvnu6C90A:9 a=CCnuJsjoL3lipwxSKYfDwGtsXwsA:4 a=CjuIK1q_8ugA:10 a=WkljmVdYkabdwxfqvArNOQ==:117 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/msg00493.txt.bz2 > So we rewrite the copy of instruction (stored in XOL) such that it > accesses its memory operand indirectly thro a scratch register. > The contents of the scratch register are stored before singlestep and > restored later. I see. That should work fine in principle, assuming you use a register that is not otherwise involved, of course. I hope you arrange to restore the register if the copied instruction is never run because of a signal or suchlike. In that case, it's important that the signal context get the original register and original PC rather than the fiddled state for running the copy. Likewise, if anyone is inspecting the registers right after the step. Thanks, Roland