Re: [PATCH -tip v8 0/9] kprobes: Kprobes jump optimization support

From: Masami Hiramatsu
Date: Fri Jan 22 2010 - 16:00:25 EST

Mathieu Desnoyers wrote:
> * Masami Hiramatsu (mhiramat@xxxxxxxxxx) wrote:
>> Hi,
>> Here are the patchset of the kprobes jump optimization v8
>> (a.k.a. Djprobe). This version is just moving onto
>> 2.6.33-rc4-tip. Ingo, I assume its a good timing to
>> push this code onto -tip tree (maybe developing branch?),
>> since people can test it with perf-probe.
>> I've decided to make a separated series of patches of
>> jump optimization with text_poke_smp() which is
>> 'officially' supported on Intel's processors.
>> So, this version of patches are just updated against
>> the latest tip/master, no other updates are included.
>> I know that int3-bypassing method (text_poke_fixup())
>> is currently unofficially believed as safe. But we
>> need to get more official answers from x86 vendors.
>> Moreover, we need to tweak entry_*.S for preventing
>> recursive NMI, because int3 inside NMI handler will
>> unblock NMI blocking. I'd like to push it after this
>> series of patches are merged.
>> Anyway, thanks Mathieu and Peter, for helping me to
>> implement it and organizing discussion points about
>> int3-bypass XMC!
>> These patches can be applied on the latest -tip.
>> Changes in v8:
>> - Update patches against the latest tip/master.
>> - Drop text_poke_fixup() related patches.
>> - Update benchmark results and add jprobes and kprobe(post-handler)
>> results.
>> And kprobe stress test didn't found any regressions - from kprobes,
>> under kvm/x86.
>> TODO:
>> - Support NMI-safe int3-bypassing text_poke.
> Please have a look at:
> "x86 NMI-safe INT3 and Page Fault"
> and
> "x86_64 page fault NMI-safe"
> That turns this TODO into the "done" section ;)
> I've been using these patches in the lttng tree for 1-2 years.

Hi Mathieu,

Sure, those looks good to me too. Thanks!

I'd just like to separate this issue from kprobe jump optimization
itself this time, because;
- text_poke_fixup() is not necessary to kprobes :-)
- the int3-bypassing text_poke method is still unofficially ensured
by intel people. and we also need to require answers from other
x86 compatible processor vendors.

Anyway, my next series of patches will contain those patches.

BTW, I think your 2nd patch seems good to send to upstream separately.

Thank you!

Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@xxxxxxxxxx

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at