<br><br><div class="gmail_quote">On Sat, Aug 6, 2011 at 11:06 AM, Mulyadi Santosa <span dir="ltr"><<a href="mailto:mulyadi.santosa@gmail.com">mulyadi.santosa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Sat, Aug 6, 2011 at 12:55, Venkatram Tummala <<a href="mailto:venkatram867@gmail.com">venkatram867@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I need to use some unexported kernel symbols in my kernel module but in the<br>
> particular kernel version i am based on (2.6.18 - RHEL 5.7),<br>
> kallsyms_lookup_name is not exported and there is no kallsyms_on_each_symbol<br>
> in this kernel. And I can't change the kernel owing to reasons i have no<br>
> control over.<br>
><br>
> In this scenario, how do i use unexported symbols. Is there any other<br>
> mechanism by which i can lookup the address of a kernel symbol.<br><br></div></div></blockquote><div><br>You can:<br><br>- grep kallsyms_lookup from /proc/kallsyms (it is there on SL 5.5 and SL 6.0. You can edit your program and assign something like:<br>
<br>int (*my_kallsyms_lookup_name)(const char *name) = (void *) KALLSYMS;<br><br>where KALLSYMS is address found above, or your loading script can feed this address. if your kernel is compiled with kprobe, you can use it to get address too.<br>
</div></div>