Subject: Re: @booted_kernel magic symlink?
To: Chapman Flack <nblists@anastigmatix.net>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 04/27/2006 20:01:52
Chapman Flack wrote:

> Simon Burge wrote:
> > Do you have a working /dev/ksyms?  At least vmstat and netstat I use
> > regularly on embedded boards with no /netbsd.
> 
> It's there and it opens on my 2.0 box - would there be any reason to
> suspect it's not working?  And yet netstat on that box can give
> reasonable looking, but wrong, information if the kernel mismatches.
> I'll try it on -current though when I have a chance; do you know of
> any bug there might have been in ksyms in 2.0?

I don't recall using ksyms from that era.

I can confirm that all of the programs Garrett mentioned as having
problems with work with no /netbsd and a working /dev/ksyms (vmstat,
netstat, pmap, fstat, systat, pstat, and ifmcstat)

It's a pity that binutils nm doesn't want to work on /dev/ksyms.
Commenting out the get_file_size() check in display_file() in
gnu/dist/binutils/binutils/nm.c does make it work on 3.0 at least.  The
middle column of the nm output for /dev/ksyms is "A" for absolute value,
but the symbol names and addresses were exactly the same for /dev/ksyms
and /netbsd.  Could do a similar check on your 2.0 system?

I'll also repeat - at least under 3.0 and -current, it would seem that
the only reason for wanting the exact location of the kernel appears to
be for savecore to squirrel away the kernel in /var/crash.  If this is
indeed the case, is the rc.conf or rc.conf.d/savecore suggestion I made
good enough for your specific case?

If there is a problem with ksyms on 2.0 then we can look at fixing it,
but other than that I don't see any other big problem that needs fixing
right now.

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Support and Service:         http://www.wasabisystems.com/