aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/kprobes.h
diff options
context:
space:
mode:
authorJon Medhurst <tixy@yxit.co.uk>2011-04-19 12:18:35 -0400
committerTixy <tixy@medhuaa1.miniserver.com>2011-07-13 13:32:42 -0400
commitaceb487ab2ea0dca43f5131e456f45bc9f8c1bed (patch)
treeef146fd590795a13a477961afb60f5468d38f566 /arch/arm/kernel/kprobes.h
parent856bc356394a28edb8c388e31212f6ceb0a04ce6 (diff)
ARM: kprobes: Add Thumb breakpoint support
Extend the breakpoint insertion and catching functions to support Thumb code. As breakpoints are no longer of a fixed size, the flush_insns macro is modified to take a size argument instead of an instruction count. Note, we need both 16- and 32-bit Thumb breakpoints, because if we were to use a 16-bit breakpoint to replace a 32-bit instruction which was in an IT block, and the condition check failed, then the breakpoint may not fire (it's unpredictable behaviour) and the CPU could then try and execute the second half of the 32-bit Thumb instruction. Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/kernel/kprobes.h')
-rw-r--r--arch/arm/kernel/kprobes.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/kernel/kprobes.h b/arch/arm/kernel/kprobes.h
index 86abfabe83f2..a84b14d8cdc8 100644
--- a/arch/arm/kernel/kprobes.h
+++ b/arch/arm/kernel/kprobes.h
@@ -18,10 +18,13 @@
18#define _ARM_KERNEL_KPROBES_H 18#define _ARM_KERNEL_KPROBES_H
19 19
20/* 20/*
21 * This undefined instruction must be unique and 21 * These undefined instructions must be unique and
22 * reserved solely for kprobes' use. 22 * reserved solely for kprobes' use.
23 */ 23 */
24#define KPROBE_BREAKPOINT_INSTRUCTION 0xe7f001f8 24#define KPROBE_ARM_BREAKPOINT_INSTRUCTION 0xe7f001f8
25#define KPROBE_THUMB16_BREAKPOINT_INSTRUCTION 0xde18
26#define KPROBE_THUMB32_BREAKPOINT_INSTRUCTION 0xf7f0a018
27
25 28
26enum kprobe_insn { 29enum kprobe_insn {
27 INSN_REJECTED, 30 INSN_REJECTED,