kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Getting address of a symbol from kernel's symbol table.
@ 2012-12-02 10:43 arif
  2012-12-02 15:49 ` Mulyadi Santosa
  0 siblings, 1 reply; 4+ messages in thread
From: arif @ 2012-12-02 10:43 UTC (permalink / raw)
  To: kernelnewbies

arif at khost:~/src/linux$ global -x ip_rcv_finish
ip_rcv_finish     319 net/ipv4/ip_input.c static int 
ip_rcv_finish(struct sk_buff *skb)

Now if i want to use this function i need to initialize a pointer to 
this function.

To be able to do that i need the address of the function.

I've seen that from user space i can read /proc/kallsyms to get an 
address of a symbol. Is their any similar mechanism exist where i can 
read the symbol table to extract a symbol's address from kernel space?

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

* Getting address of a symbol from kernel's symbol table.
  2012-12-02 10:43 Getting address of a symbol from kernel's symbol table arif
@ 2012-12-02 15:49 ` Mulyadi Santosa
  2012-12-03 12:50   ` Arif Hossain
  0 siblings, 1 reply; 4+ messages in thread
From: Mulyadi Santosa @ 2012-12-02 15:49 UTC (permalink / raw)
  To: kernelnewbies

Hi...

On Sun, Dec 2, 2012 at 5:43 PM, arif <aftnix@gmail.com> wrote:
> To be able to do that i need the address of the function.
>
> I've seen that from user space i can read /proc/kallsyms to get an
> address of a symbol. Is their any similar mechanism exist where i can
> read the symbol table to extract a symbol's address from kernel space?

check http://lxr.linux.no/#linux+v3.6.8/include/linux/kallsyms.h

I have a good guess, what you need is  kallsyms_on_each_symbol()

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

* Getting address of a symbol from kernel's symbol table.
  2012-12-02 15:49 ` Mulyadi Santosa
@ 2012-12-03 12:50   ` Arif Hossain
  2012-12-03 23:46     ` Mulyadi Santosa
  0 siblings, 1 reply; 4+ messages in thread
From: Arif Hossain @ 2012-12-03 12:50 UTC (permalink / raw)
  To: kernelnewbies

On 12/02/2012 09:49 PM, Mulyadi Santosa wrote:
> Hi...
>
> On Sun, Dec 2, 2012 at 5:43 PM, arif <aftnix@gmail.com> wrote:
>> To be able to do that i need the address of the function.
>>
>> I've seen that from user space i can read /proc/kallsyms to get an
>> address of a symbol. Is their any similar mechanism exist where i can
>> read the symbol table to extract a symbol's address from kernel space?
>
> check http://lxr.linux.no/#linux+v3.6.8/include/linux/kallsyms.h
>
> I have a good guess, what you need is  kallsyms_on_each_symbol()
>

Thanks for the pointer. I'm testing what can be done.

-- 
Cheers
arif

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

* Getting address of a symbol from kernel's symbol table.
  2012-12-03 12:50   ` Arif Hossain
@ 2012-12-03 23:46     ` Mulyadi Santosa
  0 siblings, 0 replies; 4+ messages in thread
From: Mulyadi Santosa @ 2012-12-03 23:46 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Dec 3, 2012 at 7:50 PM, Arif Hossain <aftnix@gmail.com> wrote:
> Thanks for the pointer. I'm testing what can be done.

you welcome.... you can share back what you have found in the kernelnewbies :)


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

end of thread, other threads:[~2012-12-03 23:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-02 10:43 Getting address of a symbol from kernel's symbol table arif
2012-12-02 15:49 ` Mulyadi Santosa
2012-12-03 12:50   ` Arif Hossain
2012-12-03 23:46     ` Mulyadi Santosa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).