This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] kprobe-booster: boosting multi-probe
- From: Masami Hiramatsu <hiramatu at sdl dot hitachi dot co dot jp>
- To: "bibo,mao" <bibo dot mao at intel dot com>
- Cc: prasanna at in dot ibm dot com, systemtap at sources dot redhat dot com, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, Jim Keniston <jkenisto at us dot ibm dot com>, Satoshi Oshima <soshima at redhat dot com>, Yumiko Sugita <sugita at sdl dot hitachi dot co dot jp>, Hideo Aoki <haoki at redhat dot com>, Maneesh Soni <maneesh at in dot ibm dot com>
- Date: Wed, 15 Mar 2006 22:38:26 +0900
- Subject: Re: [PATCH] kprobe-booster: boosting multi-probe
- References: <43F5C22C.5050702@sdl.hitachi.co.jp> <44151136.7020101@intel.com> <441578BF.6090001@sdl.hitachi.co.jp> <44162569.6060402@intel.com>
Hi,
bibo,mao wrote:
> Masami Hiramatsu wrote:
>> I think your patch enables booster even when preemption is
>> enabled, and it may be dangerous. Some running processes can
>> be preempted by another process when it is executing the codes in
>> the instruction buffer. When the boosted-probe is deregistered, that
>> instruction buffer is removed. Then, those preempted processes
>> can't continue to run, because they can't back to the preempted address.
>> So, I think, for the safety, the booster should NOT be enabled when
>> preemption is enabled.
>> Please fix it.
> It actually is one problem, now I fix it. But actually most time kprobe
> happen in preempt enable places, such as system call entry position,
> then booster function will lose its effect.
Sure, I know. There are some solutions for it. One of the my idea
is to inhibit preemption in the instruction buffer by
checking interruption address at the interrupt handler.
However, I thought this should modify other kernel subsystem
and the patch would become too complex.
So, in the first release patch, I just disabled booster when
preemption is enabled.
After all, this patch seems good to me.
Thanks for the hack.
--
Masami HIRAMATSU
2nd Research Dept.
Hitachi, Ltd., Systems Development Laboratory
E-mail: hiramatu@sdl.hitachi.co.jp