summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kprobes.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>2013-03-14 20:52:43 +0900
committerIngo Molnar <mingo@kernel.org>2013-03-18 10:21:23 +0100
commit9a556ab998071457e79b319f2527642dd6e50617 (patch)
tree9e38cc1f936ecbc8f9e0003644d957dd6e0770ed /arch/x86/include/asm/kprobes.h
parent65c10553552b487a71bf5e4676743435046fae6f (diff)
downloadblackbird-obmc-linux-9a556ab998071457e79b319f2527642dd6e50617.tar.gz
blackbird-obmc-linux-9a556ab998071457e79b319f2527642dd6e50617.zip
kprobes/x86: Check Interrupt Flag modifier when registering probe
Currently kprobes check whether the copied instruction modifies IF (interrupt flag) on each probe hit. This results not only in introducing overhead but also involving inat_get_opcode_attribute into the kprobes hot path, and it can cause an infinite recursive call (and kernel panic in the end). Actually, since the copied instruction itself can never be modified on the buffer, it is needless to analyze the instruction on every probe hit. To fix this issue, we check it only once when registering probe and store the result on ainsn->if_modifier. Reported-by: Timo Juhani Lindfors <timo.lindfors@iki.fi> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: yrl.pp-manager.tt@hitachi.com Cc: Steven Rostedt <rostedt@goodmis.org> Cc: David S. Miller <davem@davemloft.net> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/20130314115242.19690.33573.stgit@mhiramat-M0-7522 Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/kprobes.h')
-rw-r--r--arch/x86/include/asm/kprobes.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h
index d3ddd17405d0..5a6d2873f80e 100644
--- a/arch/x86/include/asm/kprobes.h
+++ b/arch/x86/include/asm/kprobes.h
@@ -77,6 +77,7 @@ struct arch_specific_insn {
* a post_handler or break_handler).
*/
int boostable;
+ bool if_modifier;
};
struct arch_optimized_insn {
OpenPOWER on IntegriCloud