Re: /dev/kmem

From: Albert D. Cahalan (acahalan@cs.uml.edu)
Date: Sun May 07 2000 - 01:05:39 EST


George Anzinger writes:
> Keith Owens wrote:
>> George Anzinger <george@pioneer.net> wrote:

>>> Now I am doing a lot of kernel testing and have more than one kernel on
>>> a system, using lilo to pick and choose. What is the usual method used
>>> to insure that the correct System.map file is avaiable to each system?

We use dumb luck and prayer. People whine about the piddly little bit
of kernel memory needed to store this in /proc, while the uncompressed
kernel itself is quite a monster before it even allocates BSS, etc.

>> Up to you, ksymoops and user space files are under the control of the
>> sysadmin, not the kernel. FWIW, my method is to copy .config and
>> System.map to /lib/modules/xxx after doing make modules_install for
>> kernel xxx. Other people like to store System.map in /boot and name it
>> System.map-xxx. Whatever works for you, just pass the name of your map
>> to ksymoops with the -m option.
>
> The question is which of the several kernels was booted? Does the boot
> code leave this somewhere it can be found? For example, a program can
> look at its 0'th parameter to find the file name it is running under.
> Can the system do something like this?

Currently the procps collection searches like this:

$PS_SYSMAP
$PS_SYSTEM_MAP
/boot/System.map-`uname -r`
/boot/System.map
/lib/modules/`uname -r`/System.map
/usr/src/linux/System.map
/System.map

Debian users get some sanity checking to make sure the correct
map file is being used. Everyone else needs additional prayer.

In addition to all that, the /proc/ksyms file must be read.
You will need a strong stomach to parse that one, since it
only looks like a reasonable file at first glance.

After all that, you still don't get static symbols.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:20 EST