From owner-p4-projects@FreeBSD.ORG Sat Jan 12 19:38:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 01F9416A41B; Sat, 12 Jan 2008 19:38:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB82116A419 for ; Sat, 12 Jan 2008 19:37:59 +0000 (UTC) (envelope-from jb@what-creek.com) Received: from what-creek.com (what-creek.com [66.111.37.70]) by mx1.freebsd.org (Postfix) with ESMTP id 5C24C13C44B for ; Sat, 12 Jan 2008 19:37:59 +0000 (UTC) (envelope-from jb@what-creek.com) Received: by what-creek.com (Postfix, from userid 102) id D48877329D; Sat, 12 Jan 2008 19:40:05 +0000 (GMT) Date: Sat, 12 Jan 2008 19:40:05 +0000 From: John Birrell To: Robert Watson Message-ID: <20080112194005.GA47058@what-creek.com> References: <200801120500.m0C50viG006775@repoman.freebsd.org> <20080112123333.B36731@fledge.watson.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080112123333.B36731@fledge.watson.org> User-Agent: Mutt/1.4.2.3i Cc: Perforce Change Reviews Subject: Re: PERFORCE change 133090 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2008 19:38:00 -0000 On Sat, Jan 12, 2008 at 12:35:33PM +0000, Robert Watson wrote: > On Sat, 12 Jan 2008, John Birrell wrote: > > >http://perforce.freebsd.org/chv.cgi?CH=133090 > > > >Change 133090 by jb@jb_freebsd1 on 2008/01/12 05:00:46 > > > > Add a simple libproc for use by libdtrace. This is based on > > ptrace, kevent and kvm instead of procfs like the one in Solaris. > > Does it actually depend on kvm (/dev/kmem) or just on libkvm interfaces? > We've been trying to eliminate dependence on /dev/kmem for tools that > otherwise don't require privilege over the last few years, in the interests > of eliminating setgid kmem. Generally, we've done this by adding sysctls > that explicitly export the required information, and in some cases, those > sysctls have been wrapped by existing libkvm interfaces. I guess this is > most easily answered by knowing if things using libdtrace->libproc require > setgid to operate :-). I started using the process status via kvm, but found that it was better obtained as a kevent, so the code at the moment doesn't do anything via kvm. I can probably complete the functionality via the ptrace() call and remove the libkvm stuff altogether. -- John Birrell