This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip v10 0/9] kprobes: Kprobes jump optimization support
- From: Masami Hiramatsu <mhiramat at redhat dot com>
- To: rostedt at goodmis dot org
- Cc: Frederic Weisbecker <fweisbec at gmail dot com>, Ingo Molnar <mingo at elte dot hu>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, lkml <linux-kernel at vger dot kernel dot org>, Jim Keniston <jkenisto at us dot ibm dot com>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>, Christoph Hellwig <hch at infradead dot org>, "H. Peter Anvin" <hpa at zytor dot com>, Anders Kaseorg <andersk at ksplice dot com>, Tim Abbott <tabbott at ksplice dot com>, Andi Kleen <andi at firstfloor dot org>, Jason Baron <jbaron at redhat dot com>, Mathieu Desnoyers <compudj at krystal dot dyndns dot org>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>
- Date: Wed, 24 Feb 2010 08:41:13 -0500
- Subject: Re: [PATCH -tip v10 0/9] kprobes: Kprobes jump optimization support
- References: <20100218221247.19637.80088.stgit@dhcp-100-2-132.bos.redhat.com> <1266944834.24271.6021.camel@gandalf.stny.rr.com> <4B845668.5090803@redhat.com>
Masami Hiramatsu wrote:
> Steven Rostedt wrote:
>> On Thu, 2010-02-18 at 17:12 -0500, Masami Hiramatsu wrote:
>>
>>> This version of patch series uses text_poke_smp() which
>>> update kernel text by stop_machine(). That is 'officially'
>>> supported on Intel's processors. text_poke_smp() can't
>>> be used for modifying NMI code,
>>
>> But it can be made to use with NMI code. If you look at what I did to
>> allow ftrace to modify NMI code, it may be able to do the same thing.
>
> Yeah, I know. But basically, kprobes doesn't support probing NMI.
> Maybe, it's possibly the next step. :)
I mean that it may be overkill for this series, because the kprobes
itself doesn't support NMI. So I think it should be done by another
series (for simplify patches).
BTW, now there are two candidates for NMI supported text_poke()
on x86. AFAIK, those have following issues/features.
- text_poke_fixup()
- Send IPI twice instead of kstop_machine.
- Need a detour buffer if replacing code is not a jump.
- Unofficial method for x86.
- generic ftrace_modify_code
- Use kstop_machine and wait an NMI.
- Temporarily clear the kernel text read-only flag entirely
(can we use text_poke instead?)
Thank you,
--
Masami Hiramatsu
e-mail: mhiramat@redhat.com