From owner-freebsd-current@FreeBSD.ORG Wed Nov 22 20:18:01 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8DFFA16A416 for ; Wed, 22 Nov 2006 20:18:01 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AE3D43D58 for ; Wed, 22 Nov 2006 20:17:30 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id A291E1A3C1C; Wed, 22 Nov 2006 12:18:00 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 36314515B5; Wed, 22 Nov 2006 15:17:46 -0500 (EST) Date: Wed, 22 Nov 2006 15:17:45 -0500 From: Kris Kennaway To: "Devon H. O'Dell" Message-ID: <20061122201745.GA40482@xor.obsecurity.org> References: <2b22951e0611212109t69b01400q5eb0ba15b028ce68@mail.gmail.com> <20061122051359.GA42639@what-creek.com> <20061122165735.GA37930@xor.obsecurity.org> <1164216949.18579.19.camel@buffy.york.ac.uk> <9ab217670611221016q5bd1bf84v4ef878391eb2a67a@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: <9ab217670611221016q5bd1bf84v4ef878391eb2a67a@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Cc: Kris Kennaway , "Cai, Quanqing" , John Birrell , freebsd-current@freebsd.org Subject: Re: KDTRACE is gone? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2006 20:18:01 -0000 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 22, 2006 at 01:16:17PM -0500, Devon H. O'Dell wrote: > 2006/11/22, Gavin Atkinson : > >On Wed, 2006-11-22 at 11:57 -0500, Kris Kennaway wrote: > >> On Wed, Nov 22, 2006 at 05:14:00AM +0000, John Birrell wrote: > >> > On Tue, Nov 21, 2006 at 09:09:21PM -0800, Cai, Quanqing wrote: > >> > > Today when I tried to compile my customized kernel, I run "config" > >> > > command and got this: unknown option "KDTRACE". > >> > > > >> > > Who can tell me what's going on? > >> > > >> > The KDTRACE option can't work the way I intended it to because > >> > of licensing restrictions. > >> > >> By which John means that it could easily be included in FreeBSD under > >> 'options KDTRACE' as before so that users could actually use DTRACE in > >> FreeBSD. However, it can't be included in GENERIC since the policy of > >> FreeBSD is and always has been that GENERIC is a BSD-licensed kernel. > >> With John's preferred change GENERIC would become under the CDDL. > > > >I think this is a shame - having used DTrace under Solaris a fair bit, > >it's great to know that it is always available. Often, the times I find > >I need it are exactly the times when I can't reboot to add it into the > >kernel. > > > >I haven't looked at the DTrace code at all - how much code does KDTRACE > >add to the kernel? Is it possible to write a specification for the code > >and have somebody else write the kernel parts, like has been done with > >GPL code in the past? > > > >[ I'm not volunteering, I'm just asking if it _could_ be done ] >=20 > Yeah, it could be done. However, the DTrace provider (providing BEGIN, > END, and ERROR, and code that allows for other providers to hook in) > is > 13,000 lines of code and comments, so it'd be a very non-trivial > task. Actually all that needs to happen is a) BSD licensed dtrace headers, either relicensed or reimplemented, b) stubs for the functions that return a suitable error if dtrace is not available, and c) dtrace providers available as modules that can be loaded at runtime if required. a) is still the nontrivial part, but it's less work that fully reimplementing the C code. Of course, what could happen today is that DTRACE could be imported to FreeBSD as a non-default option that any user could add to their kernels but which just wouldn't ship with GENERIC. Kris --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFZLBpWry0BWjoQKURAoG8AJ49QWxygL8LwzTXvgf57yw88d1gWgCcCYrS XythOK9FBFT43YzFIqzC/z4= =HbxL -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G--