This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip v8 10/26] kprobes/x86: Allow probe on some kprobe preparation functions
- From: Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>
- To: Steven Rostedt <rostedt at goodmis dot org>
- Cc: linux-kernel at vger dot kernel dot org, Ingo Molnar <mingo at kernel dot org>, Andi Kleen <andi at firstfloor dot org>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Sandeepa Prabhu <sandeepa dot prabhu at linaro dot org>, Frederic Weisbecker <fweisbec at gmail dot com>, x86 at kernel dot org, fche at redhat dot com, mingo at redhat dot com, systemtap at sourceware dot org, "H. Peter Anvin" <hpa at zytor dot com>, Thomas Gleixner <tglx at linutronix dot de>, Andrew Morton <akpm at linux-foundation dot org>
- Date: Tue, 25 Mar 2014 18:20:26 +0900
- Subject: Re: [PATCH -tip v8 10/26] kprobes/x86: Allow probe on some kprobe preparation functions
- Authentication-results: sourceware.org; auth=none
- References: <20140305115843 dot 22766 dot 8355 dot stgit at ltc230 dot yrl dot intra dot hitachi dot co dot jp> <20140305115953 dot 22766 dot 53497 dot stgit at ltc230 dot yrl dot intra dot hitachi dot co dot jp> <20140324153556 dot 2ae6b181 at gandalf dot local dot home>
(2014/03/25 4:35), Steven Rostedt wrote:
> On Wed, 05 Mar 2014 20:59:53 +0900
> Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote:
>
>> There is no need to prohibit probing on the functions
>> used in preparation phase. Those are safely probed because
>> those are not invoked from breakpoint/fault/debug handlers,
>> there is no chance to cause recursive exceptions.
>>
>> Following functions are now removed from the kprobes blacklist.
>> can_boost
>> can_probe
>> can_optimize
>> is_IF_modifier
>> __copy_instruction
>> copy_optimized_instructions
>> arch_copy_kprobe
>> arch_prepare_kprobe
>> arch_arm_kprobe
>> arch_disarm_kprobe
>> arch_remove_kprobe
>
> Is there any possibility that the arm and disarm could cause issues if
> we have a probe in the middle of setting it?
No problem at least on x86, since we need to take a text_mutex for
arm/disarm, those must not be called from int3/debug interrupts.
> I guess not, but I just wanted to ask, as your test only tested the
> start of function and not the middle of it.
No I've not tested yet. OK, I'll test it and report.
Thank you,
>
> -- Steve
>
>
>> arch_trampoline_kprobe
>> arch_prepare_kprobe_ftrace
>> arch_prepare_optimized_kprobe
>> arch_check_optimized_kprobe
>> arch_within_optimized_kprobe
>> __arch_remove_optimized_kprobe
>> arch_remove_optimized_kprobe
>> arch_optimize_kprobes
>> arch_unoptimize_kprobe
>>
>
>
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com