RE: Reading sys_call_table entries

"Luck, Tony" <[email protected]> Tue, 8 Oct 2002 13:11:32 -0700
Newsgroups gmane.linux.redhat.ia64.general
Message-ID <[email protected]>
Other way round.  The sys_call_table is an array of entry addresses
for functions, just about any other place is likely to give you the
address of a function pointer (which is a 2 element structure containing
the entry address and the 'gp'.  So try dereferencing the address you
get from /proc/ksyms.

-Tony

-----Original Message-----
From: Amit Purohit [mailto:[email protected]]
Sent: Tuesday, October 08, 2002 12:51 PM
To: '[email protected]'
Subject: Reading sys_call_table entries


Hi,

I am trying to read the system call table from within a kernel module.
When I try to print the address of a system call ( for eg sys_close) , the
displayed address is different from the address that is available in the
/proc/ksyms. ( machine config ia-64 redhat 7.1 linux2.4.17)

In the kernel module I am not doing anything special but simple

printk for sys_call_table[__NR_close - 1024];

Is there something I am missing out. I understood from some mail threads
that the sys_call_table doesn't contains the pointers to the functions (
system calls ) instead it contains the pointer to a descriptor which has
function  pointer and gp. Then I tried to print the new address by adding
one more level of indirection but still it gives me different address.

Thanks
-- Amit.




_______________________________________________
ia64-list mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/ia64-list