This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: module function probe
- From: "Zhang, Yanmin" <yanmin dot zhang at intel dot com>
- To: "Mao, Bibo" <bibo dot mao at intel dot com>, <systemtap at sources dot redhat dot com>
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>
- Date: Fri, 25 Nov 2005 14:14:15 +0800
- Subject: RE: module function probe
The module reference count is not correct. The module ref count should be increased with 1 when a kprobe is registered at the module exec text, and vice versa.
Yanmin
>>-----Original Message-----
>>From: Mao, Bibo
>>Sent: 2005年11月25日 13:50
>>To: systemtap@sources.redhat.com
>>Cc: 'Frank Ch. Eigler'; Keshavamurthy, Anil S; Zhang, Yanmin
>>Subject: module function probe
>>
>>Hi,
>> I wrote one module named probed.ko after compiled, and the other is kprobe
>>module named probing.ko which is to probe some function defined in probed.ko
>>module.
>> And then I executed the follow command so that some function can be probed.
>> #insmod probed.ko
>> #insmod probing.ko
>>But when I undelete module in such order kernel will crash
>> #rmmod probed.ko (system is ok)
>> #rmmod probing.ko (system will crash)
>>The reason is that when unregister kprobe it will restore original instruction,
>>but when probed module exits, its instruction address space is freed, so when
>>restore original instruction it will crash.
>>
>>Regards
>>Bibo,mao