public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [RFC][Patch 0/2]kprobe: kprobe-booster against 2.6.14-mm1 for i386
@ 2005-11-25 13:13 Masami Hiramatsu
  2005-11-25 13:16 ` [RFC][Patch 1/2]kprobe: " Masami Hiramatsu
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Masami Hiramatsu @ 2005-11-25 13:13 UTC (permalink / raw)
  To: systemtap; +Cc: Yumiko Sugita, Satoshi Oshima, Hideo Aoki

Hi,

I publish a couple of patches of kprobe-booster in next mails.
 With kprobe-booster patch, kprobes execute a copied
instruction directly and (if need) jump back to original code.
 This direct execution is executed when the kprobe don’t have
both post_handler and break_handler, and the copied instruction
can be executed directly.

What kinds of instructions can be executed directly or not?
- Call instructions are NG. We should correct the return
  address pushed into top of stack.
- Indirect instructions except for absolute indirect-jumps
  are NG. Those instructions changes EIP randomly. We should
  check EIP and correct it.
- Instructions that change EIP beyond the range of the
  instruction buffer are NG.
- Instructions that change EIP to tail 5 bytes of the
  instruction buffer (it is the size of a jump instruction).
  We must write a jump instruction which backs to original
  kernel code in the instruction buffer.
- Break point instruction is NG. We should not touch EIP and
  pass to other handlers.
- Absolute direct/indirect jumps are OK.
- Other instructions are OK. But those instructions need a
  jump back code.

Kprobe-booster checks instructions at resume_execution()
function. If it can be executed directly, it sets “boostable”
flag.
In kprobe_handler(), kprobe checks the “boostable” flag.
If the flag is set, it resets current kprobe and executes
instruction buffer directly instead of single stepping.

Best Regards,

-- 
Masami HIRAMATSU
2nd Research Dept.
Hitachi, Ltd., Systems Development Laboratory
E-mail: hiramatu@sdl.hitachi.co.jp

^ permalink raw reply	[flat|nested] 23+ messages in thread
* RE: [RFC][Patch 2/2][take2]kprobe: kprobe-booster against 2.6.14-mm1 for i386
@ 2005-12-21 18:11 Keshavamurthy, Anil S
  2005-12-22  6:07 ` Masami Hiramatsu
  0 siblings, 1 reply; 23+ messages in thread
From: Keshavamurthy, Anil S @ 2005-12-21 18:11 UTC (permalink / raw)
  To: Masami Hiramatsu, ananth, Satoshi Oshima
  Cc: systemtap, Yumiko Sugita, Hideo Aoki

>You are correct. I had misunderstood the synchronize_sched().
>I read the RCU code again, and I understood that the 
>synchronize_sched()
>is enough to check safety of the kprobe-booster.
>So, previous kprobe-booster patch is safe, but it is for old 
>-mm kernel.
>I update and post it again soon.
>
In previous kprobe-booster patch, I did not see the config option 
where you enable kprobe-booster only if kernel preemption is disabled.
So are you going to include this in your new patch?

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2005-12-22  6:00 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-25 13:13 [RFC][Patch 0/2]kprobe: kprobe-booster against 2.6.14-mm1 for i386 Masami Hiramatsu
2005-11-25 13:16 ` [RFC][Patch 1/2]kprobe: " Masami Hiramatsu
2005-11-25 13:19   ` [RFC][Patch 2/2]kprobe: " Masami Hiramatsu
2005-11-25 18:39 ` [RFC][Patch 0/2]kprobe: " Frank Ch. Eigler
2005-11-28 14:33   ` Masami Hiramatsu
2005-11-28 15:41     ` Frank Ch. Eigler
2005-11-29 14:14       ` Masami Hiramatsu
2005-11-28 14:29 ` [RFC][Patch 0/2][take2]kprobe: " Masami Hiramatsu
2005-11-28 14:30   ` [RFC][Patch 1/2][take2]kprobe: " Masami Hiramatsu
2005-11-28 14:32     ` [RFC][Patch 2/2][take2]kprobe: " Masami Hiramatsu
2005-12-06  5:27       ` Masami Hiramatsu
2005-12-12 19:49       ` Keshavamurthy Anil S
2005-12-14 14:19         ` Masami Hiramatsu
2005-12-20 13:45           ` Masami Hiramatsu
2005-12-20 17:27             ` Satoshi Oshima
2005-12-20 19:38             ` Keshavamurthy Anil S
2005-12-21  8:30               ` Ananth N Mavinakayanahalli
2005-12-21 17:39                 ` Masami Hiramatsu
2005-11-28 22:10 ` [RFC][Patch 0/2]kprobe: " Keshavamurthy Anil S
2005-11-29 14:14   ` Masami Hiramatsu
2005-11-30  2:25     ` SMP race [was: kprobe: kprobe-booster against 2.6.14-mm1 for i386] Jim Keniston
2005-12-21 18:11 [RFC][Patch 2/2][take2]kprobe: kprobe-booster against 2.6.14-mm1 for i386 Keshavamurthy, Anil S
2005-12-22  6:07 ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).