public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* managing kallsyms_addresses
@ 2008-01-31 16:48 Robin Getz
  2008-01-31 17:27 ` Paulo Marques
  0 siblings, 1 reply; 3+ messages in thread
From: Robin Getz @ 2008-01-31 16:48 UTC (permalink / raw)
  To: Rusty Russell; +Cc: linux-kernel

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-31 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-31 16:48 managing kallsyms_addresses Robin Getz
2008-01-31 17:27 ` Paulo Marques
2008-01-31 22:44   ` Robin Getz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox