Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757547AbYCUOKo (ORCPT ); Fri, 21 Mar 2008 10:10:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754873AbYCUOKe (ORCPT ); Fri, 21 Mar 2008 10:10:34 -0400 Received: from pasmtpb.tele.dk ([80.160.77.98]:57352 "EHLO pasmtpB.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754240AbYCUOKd (ORCPT ); Fri, 21 Mar 2008 10:10:33 -0400 Date: Fri, 21 Mar 2008 15:10:51 +0100 From: Sam Ravnborg To: Thomas Gleixner Cc: Roland McGrath , Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Ingo Molnar , David Miller , sparclinux@vger.kernel.org, Paul Mackerras , linuxppc-dev@ozlabs.org, Richard Henderson , tony.luck@intel.com, linux-ia64@vger.kernel.org Subject: Re: [PATCH 6/8] ptrace: arch_ptrace -ENOSYS return Message-ID: <20080321141051.GA27591@uranus.ravnborg.org> References: <20080319211714.8B14226F995@magilla.localdomain> <20080319212024.EA03126F995@magilla.localdomain> <20080320081658.0B23826F995@magilla.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1488 Lines: 41 On Fri, Mar 21, 2008 at 02:50:01PM +0100, Thomas Gleixner wrote: > On Thu, 20 Mar 2008, Roland McGrath wrote: > > > Wouldn't it be nicer to just let "arch_ptrace()" return a flag saying > > > whether it handled things or not? > > > > It would certainly be nicer. I would prefer: > > > > extern int arch_ptrace(struct task_struct *child, long request, > > long addr, long data, long *retval); > > > > where it returns an error code or it returns 0 and *retval is the value > > or it returns 1 and it didn't do anything. > > > > So this ugliness seemed like a better bet than waiting for 20 more > > arch sign-offs before any of it could go in. You are certainly in a > > position to just change the generic signature and make every arch do > > the update (or fix your typos if you just tweak them all blind), and > > let them grumble. I did not presume to do so. > > What about adding a CONFIG_ARCH_HAS_PTRACE2, which is set by the archs > which are converted. For those which are not you add a fallback > implementation: HAVE_PTRACE2 or at least following the HAVE_* semnatic. And then do: config HAVE_PTRACE2 def_bool n In some common file. Then arch files can do: config X86 ... + select HAVE_PTRACE2 Sam -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/