From owner-freebsd-current Fri Nov 21 23:14:39 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA19010 for current-outgoing; Fri, 21 Nov 1997 23:14:39 -0800 (PST) (envelope-from owner-freebsd-current) Received: from conductor.synapse.net (conductor.synapse.net [199.84.54.18]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id XAA19004 for ; Fri, 21 Nov 1997 23:14:29 -0800 (PST) (envelope-from evanc@synapse.net) Received: (qmail 18387 invoked from network); 22 Nov 1997 07:14:26 -0000 Received: from cello.synapse.net (199.84.54.81) by conductor.synapse.net with SMTP; 22 Nov 1997 07:14:26 -0000 Date: Sat, 22 Nov 1997 02:14:25 -0500 (EST) From: Evan Champion To: Jonathan Mini cc: Poul-Henning Kamp , Bruce Evans , mike@smith.net.au, freebsd-current@FreeBSD.ORG Subject: Re: Stripping the kernel In-Reply-To: <19971121155649.49582@micron.mini.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, 21 Nov 1997, Jonathan Mini wrote: > Evan, you are absolutely right. It is Bad and Evil to read things out of the > kernel memory. I have hated it from the start. However, look at the uses of > the kernel tompling, and come up with an effective efficient way to do the same > things, and I will even write it for you. :) Well, maybe that's the first step... Find everything that has to use nlist() etc. to work, and see if there's not already another way they could be implemented. As a test, I grepped for 'nlist(' in /usr/src and there are only circa 87 matches (that really call nlist) in 50 different files. A large part of this should be available from sysctl() and co. As examples, the following should be fully satisfied by sysctl(): sendmail -> load average. xntpd -> tickadj. named -> UDP checksum state. libpcap -> seems to only use it on HPUX The following can be at least partially satisfied by sysctl(): ipsend -> max number of processes (proc & nproc). ps -> pagesize. And some are just for implementing nlist, ie: libkvm, libc/gen/nlist.c. If nlist() and co. disappeared, so would the need for those libraries... The problem spots are mainly things like savecore (whose soul purpose is to operate on symbol tables) and the device-driver-specific programs (like ncrcontrol). I think the device-driver-specific programs could be implemented using device-specific ioctl's (as the DPT driver does). I don't have a nice solution for savecore and co. But there seems to be at least some hope here. Evan