]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
kprobes/x86: Allow probe on some kprobe preparation functions
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Thu, 17 Apr 2014 08:17:47 +0000 (17:17 +0900)
committerIngo Molnar <mingo@kernel.org>
Thu, 24 Apr 2014 08:03:01 +0000 (10:03 +0200)
commit7ec8a97a990da8e3ba87175a757731e17f74072e
tree4d937ea40000427c5f469f93775b2a0a13732e17
parentecd50f714c421c759354632dd00f70c718c95b10
kprobes/x86: Allow probe on some kprobe preparation functions

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
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

I tested those functions by putting kprobes on all
instructions in the functions with the bash script
I sent to LKML. See:

  https://lkml.org/lkml/2014/3/27/33

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Jonathan Lebon <jlebon@redhat.com>
Link: http://lkml.kernel.org/r/20140417081747.26341.36065.stgit@ltc230.yrl.intra.hitachi.co.jp
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/kprobes/core.c
arch/x86/kernel/kprobes/ftrace.c
arch/x86/kernel/kprobes/opt.c