Date: Sat, 22 Nov 1997 02:14:25 -0500 (EST) From: Evan Champion <evanc@synapse.net> To: Jonathan Mini <j_mini@efn.org> Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, Bruce Evans <bde@zeta.org.au>, mike@smith.net.au, freebsd-current@FreeBSD.ORG Subject: Re: Stripping the kernel Message-ID: <Pine.BSF.3.96.971122012413.3940H-100000@cello.synapse.net> In-Reply-To: <19971121155649.49582@micron.mini.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971122012413.3940H-100000>