From owner-svn-src-all@FreeBSD.ORG Sun Mar 13 06:35:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8273A106564A; Sun, 13 Mar 2011 06:35:22 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id DF16C8FC0C; Sun, 13 Mar 2011 06:35:21 +0000 (UTC) Received: by qwc9 with SMTP id 9so707673qwc.13 for ; Sat, 12 Mar 2011 22:35:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=k3PRQRVCsNGc4zdPsY3o5P3/iNvi5kGttLmOmyRXVB4=; b=BJ3ZPInqfwKVJxxJ/EJCYx0QUT0KCbrzgBocNIcnZ82gt9KVVsBZY9inQbQy804HOW UZ6oJqx6AC1ET81zMxG+voJwBcSYGpQYH0/fgPTCwaDKY8VLePboh2GjUHksKAgXuLf7 8EIS7QhK89Nsi8eXONYwT21z/28+WtfQse2TA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=fusd5LRUXq3FjgCbIn8OsNgiRngRPkSZN+gLc96VwdTulvyhcrDC0HoG/Aw4KJdLTC E+rOCpFC4eHCLSJZ4lQEPrsmYHwbujvvsVokFzeoBEvZRweA44vjYxgUurp4RyXs64ai RsGLsm11d/E51mbzqOtokWfqHDhjLTnO0f72A= MIME-Version: 1.0 Received: by 10.229.0.202 with SMTP id 10mr140331qcc.173.1299998121087; Sat, 12 Mar 2011 22:35:21 -0800 (PST) Sender: artemb@gmail.com Received: by 10.229.31.83 with HTTP; Sat, 12 Mar 2011 22:35:21 -0800 (PST) In-Reply-To: <20110312211423.00000f34@unknown> References: <201103120909.p2C99P2j010783@svn.freebsd.org> <20110312211423.00000f34@unknown> Date: Sat, 12 Mar 2011 22:35:21 -0800 X-Google-Sender-Auth: YdtpF39b_jbnWdSn02KTQ-d8Rcg Message-ID: From: Artem Belevich To: Alexander Leidinger Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon 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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2011 06:35:22 -0000 On Sat, Mar 12, 2011 at 12:14 PM, Alexander Leidinger wrote: >> =A0 syscall::xxx:yyy - work on all system calls that match the >> specification syscall:freebsd:xxx:yyy - only native system calls >> =A0 syscall:linux32:xxx:yyy - linux32 compat system calls >> =A0 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? Sure. > >> Modified: head/sys/cddl/dev/systrace/systrace.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/cddl/dev/systrace/systrace.c =A0 =A0 Sat Mar 12 08:58:19 >> 2011 =A0(r219560) +++ >> head/sys/cddl/dev/systrace/systrace.c Sat Mar 12 09:09:25 >> 2011 =A0(r219561) @@ -59,17 +59,38 @@ #include >> >> =A0#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. It's there, it should work, but I didn't get to test it. >> +#else >> +#error Only i386 and amd64 are supported. >> +#endif >> =A0extern struct sysent linux_sysent[]; >> -#define =A0 =A0 =A0DEVNAME =A0 =A0 =A0 =A0 "dtrace/linsystrace" >> -#define =A0 =A0 =A0PROVNAME =A0 =A0 =A0 =A0"linsyscall" >> +#define =A0 =A0 =A0MODNAME =A0 =A0 =A0 =A0 "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--- Makes sense. It's what's done with freebsd syscalls -- 'freebsd' for native syscalls, freebsd32 for 32-bit compat. --Artem