managing kallsyms_addresses



When the kernel needs to find out what symbol is at a specific address, it
uses kallsyms_lookup() This seems to work pretty well - almost.

The problem is today, we don't to remove the symbols from the init section
when the init section is freed. There is invalid data in kallsyms_addresses.

The problem I have been experiencing - If you have a module get loaded into a
location which was init, then kallsyms_lookup() can return init labels,
rather than the module labels. (since it looks up kernel labels before module
labels).

What happens is if there is a OOPS in the module, the labels from the OOPS can
point to init code (which doesn't exist), which confuses the heck out of
users and developers...

There would be two solutions:
- when freeing the init section, remove all the init labels from the
kallsyms_addresses, and resort/pack it.
- if the init section is unloaded, have is_kernel_inittext always return 0.

I assume that similar things need to be handled for module init too, but I
have not run into that yet.

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



Relevant Pages

  • Re: [PATCH 2.6] Fix i2c messsage flags in video drivers
    ... Still the oops in saa7110 went ... no init, cannot set norm ... least MJPEG capture and overlay display has to work to some degree. ...
    (Linux-Kernel)
  • OOPS report
    ... I get this OOPS every time I go to runlevel S or 6 from 2: ... INIT: Sending processes the TERM signal ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Oops with PREEMPT-RT on 2.6.25.4
    ... I get the following oops when trying to boot a arch/powerpc kernel with ... The oops seems to happen on fileaccess right ... Freeing unused kernel memory: 128k init ... PREEMPT Innovative Systems ApMax ...
    (Linux-Kernel)
  • PROBLEM: Oops in __is_prefetch with 2.6.0-test9-bk4 at boot time with Athlon XP 1800+
    ... init process. ... When I compiled and booted the 2.6.0-test9-bk4 kernel first time, ... Oops: ... b800-b81f: VIA Technologies, Inc. USB ...
    (Linux-Kernel)
  • Re: 2.6.15-rc5-mm1
    ... > I still get this oops on boot, then the machine freezes hard on the init ...
    (Linux-Kernel)