From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753869Ab2BHJxV (ORCPT ); Wed, 8 Feb 2012 04:53:21 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:45616 "EHLO e37.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751199Ab2BHJxT (ORCPT ); Wed, 8 Feb 2012 04:53:19 -0500 Date: Wed, 8 Feb 2012 15:10:09 +0530 From: Srikar Dronamraju To: Denys Vlasenko Cc: Peter Zijlstra , Linus Torvalds , Oleg Nesterov , Ingo Molnar , Andrew Morton , LKML , Linux-mm , Andi Kleen , Christoph Hellwig , Steven Rostedt , Roland McGrath , Thomas Gleixner , Masami Hiramatsu , Arnaldo Carvalho de Melo , Anton Arapov , Ananth N Mavinakayanahalli , Jim Keniston , Stephen Rothwell Subject: Re: [PATCH v10 3.3-rc2 1/9] uprobes: Install and remove breakpoints. Message-ID: <20120208094009.GB24443@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <20120202141840.5967.39687.sendpatchset@srdronam.in.ibm.com> <20120202141851.5967.68000.sendpatchset@srdronam.in.ibm.com> <20120207171707.GA24443@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12020809-7408-0000-0000-0000027C6954 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Denys Vlasenko [2012-02-08 10:40:30]: > On Tue, Feb 7, 2012 at 6:17 PM, Srikar Dronamraju > wrote: > > Changelog: (Since v10): Add code to clear REX.B prefix pointed out by Denys Vlasenko > > and fix suggested by Masami Hiramatsu. > ... > > +       /* > > +        * Point cursor at the modrm byte.  The next 4 bytes are the > > +        * displacement.  Beyond the displacement, for some instructions, > > +        * is the immediate operand. > > +        */ > > +       cursor = uprobe->insn + insn_offset_modrm(insn); > > +       insn_get_length(insn); > > +       if (insn->rex_prefix.nbytes) > > +               *cursor &= 0xfe;        /* Clearing REX.B bit */ > > It looks like cursor points to mod/reg/rm byte, not rex byte. > Comment above says it too. You seem to be clearing a bit > in a wrong byte. I think it should be Oh okay, Will correct this and send out a new patch. > > /* Clear REX.b bit (extension of MODRM.rm field): > * we want to encode rax/rcx, not r8/r9. > */ > if (insn->rex_prefix.nbytes) > insn->rex_prefix.bytes[0] &= 0xfe; -- Thanks and Regards Srikar From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx119.postini.com [74.125.245.119]) by kanga.kvack.org (Postfix) with SMTP id 81FF36B13F0 for ; Wed, 8 Feb 2012 04:52:15 -0500 (EST) Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 Feb 2012 02:52:14 -0700 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id B538D3E4004C for ; Wed, 8 Feb 2012 02:52:11 -0700 (MST) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q189qBuw101852 for ; Wed, 8 Feb 2012 02:52:11 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q189q9mb008474 for ; Wed, 8 Feb 2012 02:52:10 -0700 Date: Wed, 8 Feb 2012 15:10:09 +0530 From: Srikar Dronamraju Subject: Re: [PATCH v10 3.3-rc2 1/9] uprobes: Install and remove breakpoints. Message-ID: <20120208094009.GB24443@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <20120202141840.5967.39687.sendpatchset@srdronam.in.ibm.com> <20120202141851.5967.68000.sendpatchset@srdronam.in.ibm.com> <20120207171707.GA24443@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Denys Vlasenko Cc: Peter Zijlstra , Linus Torvalds , Oleg Nesterov , Ingo Molnar , Andrew Morton , LKML , Linux-mm , Andi Kleen , Christoph Hellwig , Steven Rostedt , Roland McGrath , Thomas Gleixner , Masami Hiramatsu , Arnaldo Carvalho de Melo , Anton Arapov , Ananth N Mavinakayanahalli , Jim Keniston , Stephen Rothwell * Denys Vlasenko [2012-02-08 10:40:30]: > On Tue, Feb 7, 2012 at 6:17 PM, Srikar Dronamraju > wrote: > > Changelog: (Since v10): Add code to clear REX.B prefix pointed out by Denys Vlasenko > > and fix suggested by Masami Hiramatsu. > ... > > + /* > > + * Point cursor at the modrm byte. The next 4 bytes are the > > + * displacement. Beyond the displacement, for some instructions, > > + * is the immediate operand. > > + */ > > + cursor = uprobe->insn + insn_offset_modrm(insn); > > + insn_get_length(insn); > > + if (insn->rex_prefix.nbytes) > > + *cursor &= 0xfe; /* Clearing REX.B bit */ > > It looks like cursor points to mod/reg/rm byte, not rex byte. > Comment above says it too. You seem to be clearing a bit > in a wrong byte. I think it should be Oh okay, Will correct this and send out a new patch. > > /* Clear REX.b bit (extension of MODRM.rm field): > * we want to encode rax/rcx, not r8/r9. > */ > if (insn->rex_prefix.nbytes) > insn->rex_prefix.bytes[0] &= 0xfe; -- Thanks and Regards Srikar -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org