Subject: Re: word processor that runs on NetBSD/i386? (FAQ?)
To: Greg A. Woods <woods@weird.com>
From: Perry E. Metzger <perry@piermont.com>
List: port-i386
Date: 06/22/1998 23:11:24
Greg A. Woods writes:
> The concept of /proc and /kern are *incredibly* elegant and unix-like
> and I'm seriously dismayed that NetBSD hasn't moved more directly to
> making them integral parts of the system with an eye to totally
> eliminating the need for kernel grubbing through /dev/kmem et al and the
> unsolvable user-land incompatability problems such ancient hacks have
> perpetuated.
Ah! You ask "why is it that we don't use /proc and /kern more!"
I used to ask this for a while and lobby for them, but I finally
understood why they were a very bad idea and I stopped.
The problem is simple: you can't read /proc from your kernel core
dump! The unfortunate result is that you need to be able to grovel
kernel cores to do ps'es and all the rest on kernel core files, so you
need the code that walks kernel memory anyway, so you'd be maintaining
both the /proc and /dev/kmem version of the code, which would be
pointless and lead to one or the other being badly maintained, so
there is no reason NOT to just keep /dev/kmem in the first place.
The /proc and /kern we ship with were written mostly for hack value
from what I understand.
I realize this is ugly, but having had to figure out what the grot
happened in my kernel when it paniced on many occassions, I would not
want to be left without the tools.
Perry