I'm writing a kernel module which involves the tasklist_lock
, __bss_start
.
These symbols are not exported. I'm pretty sure even if not exported, we can access the symbols from text sections using kernsym_lookup_name()
Reference How my custom module on linux 3.2.28 can make a call to print_cpu_info?
$ vim System.map
...
80017be0 T register_undef_hook
80017c28 T unregister_undef_hook
80017c70 T do_unexp_fiq
...
806eb000 D mmlist_lock
806eb040 D tasklist_lock
806eb080 d softirq_vec
....
T
represents text symbol.
D
and d
represents data segment symbol.
I'm able to access register_undef_hook()
and unregister_undef_hook()
using kallsyms_lookup_name()
.
But not tasklist_lock
.
Please share your knowledge to access tasklist_lock
from kernel module(LKM).