From owner-svn-src-head@FreeBSD.ORG Sat Mar 12 20:14:34 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 427F5106566B; Sat, 12 Mar 2011 20:14:34 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id C76A78FC14; Sat, 12 Mar 2011 20:14:33 +0000 (UTC) Received: from outgoing.leidinger.net (p5B15640F.dip.t-dialin.net [91.21.100.15]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id B55BE844015; Sat, 12 Mar 2011 21:14:27 +0100 (CET) Received: from unknown (IO.Leidinger.net [192.168.2.110]) by outgoing.leidinger.net (Postfix) with ESMTP id EB1A52A0B; Sat, 12 Mar 2011 21:14:24 +0100 (CET) Date: Sat, 12 Mar 2011 21:14:23 +0100 From: Alexander Leidinger To: Andriy Gapon Message-ID: <20110312211423.00000f34@unknown> In-Reply-To: <201103120909.p2C99P2j010783@svn.freebsd.org> References: <201103120909.p2C99P2j010783@svn.freebsd.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.16.0; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: B55BE844015.A678B X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=0.317, required 6, autolearn=disabled, ALL_TRUSTED -1.00, SARE_LWSHORTT 1.24, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1300565670.73712@bqYWLELFIjcB6y5aQ2dsnQ X-EBL-Spam-Status: No Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Artem Belevich Subject: Re: svn commit: r219561 - in head/sys: cddl/dev/systrace modules/dtrace modules/dtrace/dtraceall modules/dtrace/systrace_freebsd32 modules/dtrace/systrace_linux32 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2011 20:14:34 -0000 On Sat, 12 Mar 2011 09:09:25 +0000 (UTC) Andriy Gapon wrote: > Author: avg > Date: Sat Mar 12 09:09:25 2011 > New Revision: 219561 > URL: http://svn.freebsd.org/changeset/base/219561 > > Log: > add DTrace systrace support for linux32 and freebsd32 on amd64 > syscalls > Add systrace_linux32 and systrace_freebsd32 modules which provide > support for tracing compat system calls in addition to native system > call tracing provided by systrace module. > > Provided that all the systrace modules are loaded now you can select > what syscalls to trace in the following manner: > > syscall::xxx:yyy - work on all system calls that match the > specification syscall:freebsd:xxx:yyy - only native system calls > syscall:linux32:xxx:yyy - linux32 compat system calls > syscall:freebsd32:xxx:yyy - freebsd32 compat system calls on amd64 I am working on some SDT probes for the linuxulator. The way I handle it there is to use "linuxulator" for the native size, and "linuxulator32" for the current 32-bit linux emulation on amd64. When the amd64 arch gets a native linux emulation (dchagin@ has patches) this would allow to trace both in a sane way. Is it possible to have "linux" as the modname on i386? Is it easy to have both linux syscall types (64 bit and 32 bit) on amd64 in case native support arrives in this code? > Modified: head/sys/cddl/dev/systrace/systrace.c > ============================================================================== > --- head/sys/cddl/dev/systrace/systrace.c Sat Mar 12 08:58:19 > 2011 (r219560) +++ > head/sys/cddl/dev/systrace/systrace.c Sat Mar 12 09:09:25 > 2011 (r219561) @@ -59,17 +59,38 @@ #include > > #ifdef LINUX_SYSTRACE > -#include > -#include > -#include > -#include > -#include > +#if defined(__amd64__) > +#include > +#include > +#include > +#include > +#elif defined(__i386__) > +#include > +#include > +#include > +#include This looks like there is also support for linux syscalls on 386. > +#else > +#error Only i386 and amd64 are supported. > +#endif > extern struct sysent linux_sysent[]; > -#define DEVNAME "dtrace/linsystrace" > -#define PROVNAME "linsyscall" > +#define MODNAME "linux32" But this looks like it will be named linux32 in any case. In the short term I would prefer: ---snip--- #if defined(__amd64__) #define MODNAME "linux32" #elif defined(__i386__) #define MODNAME "linux" #endif ---snip--- > #define MAXSYSCALL LINUX_SYS_MAXSYSCALL > #define SYSCALLNAMES linux_syscallnames > #define SYSENT linux_sysent Bye, Alexander.