From owner-freebsd-current@FreeBSD.ORG Tue Feb 22 03:17:35 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B180816A4CE for ; Tue, 22 Feb 2005 03:17:35 +0000 (GMT) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CB8543D45 for ; Tue, 22 Feb 2005 03:17:35 +0000 (GMT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id 562DD72DD8; Mon, 21 Feb 2005 19:17:35 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id 51A4972DCB; Mon, 21 Feb 2005 19:17:35 -0800 (PST) Date: Mon, 21 Feb 2005 19:17:35 -0800 (PST) From: Doug White To: Pascal Hofstee In-Reply-To: Message-ID: <20050221191111.R89025@carver.gumbysoft.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: FreeBSD Current Subject: Re: GNUstep and libkvm X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 22 Feb 2005 03:17:35 -0000 On Sun, 20 Feb 2005, Pascal Hofstee wrote: > A while ago i initiated a thread on hackers@ requesting additional > information regarding a known issue with the gnustep-gui port "needing > /proc" even when gnustep-base itself (which in turn is used by -gui) > was compiled without procfs support. > > The results of my findings can be found in the following list-archive entries: > > http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg49357.html > http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg49577.html > > Short summary is the kvm_getargv function seems to trigger a kvm_uread > call when the length of "command + argumentlist" exceeds the value of > kern.ps_arg_cache_limit. > > This kvm_uread call is responsible for the observed /proc groveling. > I had hoped to acquire some additional information on how to properlly > debug libkvm in GDB and if this /proc dependency is intended behavior. You could just read the code :-) libkvm is a userspace library, source is in src/lib/libkvm. > To me personally (though i am not a kernel hacker) it doens't really > make sense to have libkvm (which is intended to be a 'replacement' for > /proc to my understanding) intenrally depend on the same system it's > trying to 'replace', though I noticed from the manpages that the > kvm_getargv function doesn't really belong in libkvm. libkvm is actually "legacy"; /proc came after it, but we've been moving away from requiring procfs since its skilled at opening security holes. libkvm originally needed to grovel in /dev/kmem and much of that has migrated to using special-purpose sysctls. > Can anybody at least either confirm wether or not this is > - intended behavior > - a bug and a proper PR should likely be created ps(1) sets up some flags to avoid needing it on -CURRENT and RELENG_5; you might reference that for how to use the sysctl to read the ps information. There is some information that is only available via /proc, though; the process environment is an easy example (and ps throws an error if you specify -e and procfs isn't available). -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org