* news about retrieving kernel symbols (tasklist_struct)
@ 2006-09-25 15:25 Giacomo
2006-09-25 15:52 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Giacomo @ 2006-09-25 15:25 UTC (permalink / raw)
To: netfilter devel
Good afternoon.
As to the need to retrieve the symbol tasklist_lock, which is no more
exported in kernel 2.6.18, i tried to use the
kallsyms_lookup_name("tasklist_lock");
function.
It returns an unsigned long which should be the address of the symbol,
e.g. the variable tasklist_lock.
So i tried to use it, but it does not work!
-------------------------------------------------------------------
rwlock_t tasklist_lock_from_symbol;
unsigned long tlockptr;
tlockptr = kallsyms_lookup_name("tasklist_lock");
if( tlockptr == 0)
return NULL;
printk("symbol: 0x%lx\n", tlockptr);
memcpy(&tasklist_lock_from_symbol, (void*) &tlockptr, sizeof(rwlock_t) );
read_lock(&tasklist_lock_from_symbol);
(...)
---------------------------------------------------------------------
Perhaps this is not the right way to retrieve the address of the variable...
thanks a lot
--
Giacomo S.
http://www.giacomos.it
- - - - - - - - - - - - - - - - - - - - - -
Proteggi il tuo PC provando il mio semplice FIREWALL:
http://www.giacomos.it/ipfire
mailto:
delleceste@gmail.com
giacomo.strangolino@elettra.trieste.it
jacum@libero.it
- - - - - - - - - - - - - - - - - - - - - -
. '' `.
: :' :
`. ` '
`- Debian GNU/Linux -- The power of freedom
http://www.debian.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: news about retrieving kernel symbols (tasklist_struct)
2006-09-25 15:25 news about retrieving kernel symbols (tasklist_struct) Giacomo
@ 2006-09-25 15:52 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2006-09-25 15:52 UTC (permalink / raw)
To: Giacomo; +Cc: netfilter devel
Giacomo wrote:
> Good afternoon.
> As to the need to retrieve the symbol tasklist_lock, which is no more
> exported in kernel 2.6.18, i tried to use the
There is a reason why it is not exported anymore. You can't use
it from netfilter.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-25 15:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-25 15:25 news about retrieving kernel symbols (tasklist_struct) Giacomo
2006-09-25 15:52 ` Patrick McHardy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.