Subject: Re: passing in the booted kernel name...?
To: None <M.Drochner@fz-juelich.de>
From: Soren S. Jorvang <soren@t.dk>
List: tech-kern
Date: 01/09/1999 01:20:55
On Sat, Jan 09, 1999 at 12:32:38AM +0100, drochner@zel459.zel.kfa-juelich.de wrote:
>
> soren@t.dk said:
> > I was thinking of some more general way of accomplishing what
> > machdep.booted_kernel does, i.e. mostly where to point kvm_mkdb at.
>
> What's wrong with some startup script like:
> mykernel = /`sysctl machdep.booted_kernel`
> if [a version check($mykernel) passes]; do
> kvm_mkdb $mykernel
> else
> [print warning or so]
> done
But doing only that would limit better kvm_mkdb usage to systems
where a reasonably trustworthy booted_kernel can be implemented.
booted_kernel might be nice in combination with something
like 'check version[] of /netbsd*', but given the various
limitations that have been discussed, I rather think
restricting the support to just /netbsd* (and perhaps a
select set of other locations) is enough, so I don't really
see much point to booted_kernel.
> > so perhaps
> > simply checking all of /netbsd* for a version string matching
> > the running kernel's would be better than trying to improve
> > booted_kernel.
[...]
> Of course it would make things safer if the symbol table would
> be loaded with the kernel image and accessed via a system call,
In general, I'd rather see the various kmem-grovelers slowly
changed use dedicated kernel calls. Even ignoring the matching
problems, ps can be annoyingly slow on loaded systems because
of all the I/O it does.
--
Soren