aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/kprobes-common.c
diff options
context:
space:
mode:
authorJon Medhurst <tixy@yxit.co.uk>2011-07-02 10:36:32 -0400
committerTixy <tixy@medhuaa1.miniserver.com>2011-07-13 13:32:43 -0400
commit3f92dfed6a9a5f490128c8e7cc6a64dfe412994f (patch)
tree1d503b19d01075dfd1db1023b8d0e787f9d58bb6 /arch/arm/kernel/kprobes-common.c
parent0d1a095aa1e6e2a233bfb1729e15233e77f69d54 (diff)
ARM: kprobes: Decode 16-bit Thumb hint instructions
For hints which may have observable effects, like SEV (send event), we use kprobe_emulate_none which emulates the hint by executing the original instruction. For NOP we simulate the instruction using kprobe_simulate_nop, which does nothing. As probes execute with interrupts disabled this is also used for hints which may block for an indefinite time, like WFE (wait for event). Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/kernel/kprobes-common.c')
-rw-r--r--arch/arm/kernel/kprobes-common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/kernel/kprobes-common.c b/arch/arm/kernel/kprobes-common.c
index 1cb6a82a5e24..3a3e765d2090 100644
--- a/arch/arm/kernel/kprobes-common.c
+++ b/arch/arm/kernel/kprobes-common.c
@@ -142,6 +142,15 @@ kprobe_check_cc * const kprobe_condition_checks[16] = {
142}; 142};
143 143
144 144
145void __kprobes kprobe_simulate_nop(struct kprobe *p, struct pt_regs *regs)
146{
147}
148
149void __kprobes kprobe_emulate_none(struct kprobe *p, struct pt_regs *regs)
150{
151 p->ainsn.insn_fn();
152}
153
145/* 154/*
146 * Prepare an instruction slot to receive an instruction for emulating. 155 * Prepare an instruction slot to receive an instruction for emulating.
147 * This is done by placing a subroutine return after the location where the 156 * This is done by placing a subroutine return after the location where the