Re: A more accurate System.map, including modules

Keith Owens (kaos@ocs.com.au)
Mon, 22 Sep 1997 21:39:01 +1000


On Mon, 22 Sep 1997 09:01:56 +1000,
Richard Gooch <rgooch@atnf.CSIRO.AU> wrote:
>Keith Owens writes:
>> ftp://ftp.ocs.com.au/make_System_map.pl.gz (3.5K) builds a more
>> accurate map from your existing System.map, the information from
>> /proc/ksyms and your modules directories.
>
>This is a good step forward, but it requires that after you get an
>oops enough of the system is still left running that you can run
>ksymoops. I've had a few cases where syslogd is still logging, but I
>can't run commands. Going back later (after a reboot) and running
>make_System_map.pl doesn't work because the location of modules has
>changed. This is especially the case for people running kerneld.
>What about modifying klogd to do the things ksymoops does?

Same problem, make_System_map has to run commands and open files, if
only to read /proc/ksyms and get the nm data for the modules. If you
cannot issue cat or nm commands yourself, then klogd is going to have
the same problem.

However all that is required to diagnose an oops after the machine has
been rebooted is the data in /proc/ksyms at the time of the oops.
Remember that make_System_map does not require the real /proc/ksyms, it
can be a copy. ksyms is the only data that changes from run to run,
System.map and modules are only changed by kernel recompiles. So what
you really need is a way of capturing the current ksyms to a file when
an oops occurs.

That could be a simple extension to klogd, when an oops is detected,
copy /proc/ksyms to a file and run a specified program such as
make_System_map. If my approach to extending the map is accepted, I'll
add that option to klogd later.