Thread (6 messages) 6 messages, 3 authors, 2011-08-09

kallsyms_lookup_name

From: Mulyadi Santosa <hidden>
Date: 2011-08-06 18:06:06

On Sat, Aug 6, 2011 at 12:55, Venkatram Tummala [off-list ref] wrote:
Hi,

I need to use some unexported kernel symbols in my kernel module but in the
particular kernel version i am based on (2.6.18 - RHEL 5.7),
kallsyms_lookup_name is not exported and there is no kallsyms_on_each_symbol
in this kernel. And I can't change the kernel owing to reasons i have no
control over.

In this scenario, how do i use unexported symbols. Is there any other
mechanism by which i can lookup the address of a kernel symbol.
I think it's a bit dirty, but how about scanning the kernel ".text"
area and find the start of "code fingerprint" of
kallsyms_on_each_symbol?

What I meant by fingerprint is actually few first bytes of the
function, likely ones that did stack pop and does initial looping.

Or if possible, use debuginfo repository and use the debug symbols to
see where the symbol is located. Then do direct "call".

Just a thought....

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help