Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753889Ab0BHQe6 (ORCPT ); Mon, 8 Feb 2010 11:34:58 -0500 Received: from mtagate5.uk.ibm.com ([194.196.100.165]:36401 "EHLO mtagate5.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753646Ab0BHQe4 (ORCPT ); Mon, 8 Feb 2010 11:34:56 -0500 Date: Mon, 8 Feb 2010 17:34:54 +0100 From: Heiko Carstens To: Jason Baron Cc: linux-kernel@vger.kernel.org, laijs@cn.fujitsu.com, lizf@cn.fujitsu.com, rostedt@goodmis.org, fweisbec@gmail.com, mingo@elte.hu, hpa@zytor.com, tglx@linutronix.de, mhiramat@redhat.com Subject: Re: [PATCH 4/6] tracing: add tracing support for compat syscalls Message-ID: <20100208163454.GE12726@osiris.boeblingen.de.ibm.com> References: <20100203125251.GA30003@osiris.boeblingen.de.ibm.com> <20100208154325.GB2688@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100208154325.GB2688@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2331 Lines: 53 On Mon, Feb 08, 2010 at 10:43:25AM -0500, Jason Baron wrote: > On Wed, Feb 03, 2010 at 01:52:51PM +0100, Heiko Carstens wrote: > > On Tue, Feb 02, 2010 at 04:21:51PM -0500, Jason Baron wrote: > > > Add core support to event tracing for compat syscalls. The basic idea is that we > > > check if we have a compat task via 'is_compat_task()'. If so, we lookup in the > > > new compat_syscalls_metadata table, the corresponding struct syscall_metadata, to > > > check syscall arguments and whether or not we are enabled. > > > > > > Signed-off-by: Jason Baron > > > --- > > > include/linux/compat.h | 8 +++++ > > > include/trace/syscall.h | 4 ++ > > > kernel/trace/trace.h | 2 + > > > kernel/trace/trace_syscalls.c | 63 +++++++++++++++++++++++++++++++++++----- > > > 4 files changed, 69 insertions(+), 8 deletions(-) > > > > > > diff --git a/include/linux/compat.h b/include/linux/compat.h > > > index ef68119..ab2cda2 100644 > > > --- a/include/linux/compat.h > > > +++ b/include/linux/compat.h > > > @@ -353,5 +353,13 @@ asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, > > > asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, > > > int flags, int mode); > > > > > > +#else /* CONFIG_COMPAT */ > > > + > > > +#define NR_syscalls_compat 0 > > > +static inline int is_compat_task(void) > > > +{ > > > + return 0; > > > +} > > > + > > > #endif /* CONFIG_COMPAT */ > > > #endif /* _LINUX_COMPAT_H */ > > > > This part will break compilation on s390, since it has already the same > > function defined for !CONFIG_COMPAT. > > If multiple arches want this definition, then it seems the the common > include/linux/compat.h is good place for it. > > > In order to avoid the whole ifdef mess some s390 files do include > > asm/compat.h instead of linux/compat.h. This will get messy :) > > is there a way for s390 to use the common include/linux/compat.h file? > what other arch defs are required? Yes of course it is possible (I think :). I'll send a patch. -- 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/