From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e1.ny.us.ibm.com ([32.97.182.141]:13022 "EHLO e1.ny.us.ibm.com") by vger.kernel.org with ESMTP id S1750749AbWHIPTB (ORCPT ); Wed, 9 Aug 2006 11:19:01 -0400 Date: Wed, 9 Aug 2006 20:50:18 +0530 From: Ananth N Mavinakayanahalli Subject: Re: [PATCH 2/3] Kprobes: Define retval helper Message-ID: <20060809152018.GA17486@in.ibm.com> Reply-To: ananth@in.ibm.com References: <20060809094516.GA17993@infradead.org> <20060807115537.GA15253@in.ibm.com> <20060807120024.GD15253@in.ibm.com> <20060808162559.GB28647@infradead.org> <20060809094311.GA20050@in.ibm.com> <26750.1155129364@warthog.cambridge.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26750.1155129364@warthog.cambridge.redhat.com> Sender: linux-arch-owner@vger.kernel.org To: David Howells Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, Prasanna S Panchamukhi , Anil S Keshavamurthy , Jim Keniston , linux-arch@vger.kernel.org List-ID: On Wed, Aug 09, 2006 at 02:16:04PM +0100, David Howells wrote: > Christoph Hellwig wrote: > > > > > Good idea. You should add parentheses around regs, otherwise the C > > > > preprocessor might bite users. Also the shouting name is quite ugly. > > > > In fact it should probably go to asm/system.h or similar and not have > > > > a kprobes name - it just extracts the return value from a struct pt_regs > > > > after all. > > > > > > Done! How does this look? I added it to asm/ptrace.h so it lives along > > > with the instruction_pointer() definition. > > I presume we don't care about return values that span multiple registers - for > instance if you return a 64-bit value on i386 it'll wind up in EDX:EAX. Yes. This helper is mostly to address the common case, not the 64-bit one. Ananth