diff options
author | Nicolas Pitre <nico@cam.org> | 2007-12-03 17:22:36 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-01-26 10:25:17 -0500 |
commit | 796969104cab0d454dbc792ad0d12a4f365a8564 (patch) | |
tree | 214eebbe0c8cdee597184feb365c60b574650f6a /include | |
parent | 785d3cd286f0bf67d1bf692559b9ae5de12678f5 (diff) |
ARM kprobes: special hook for the kprobes breakpoint handler
The kprobes code is already able to cope with reentrant probes, so its
handler must be called outside of the region protected by undef_lock.
If ever this lock is released when handlers are called then this commit
could be reverted.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/kprobes.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-arm/kprobes.h b/include/asm-arm/kprobes.h index 273f37413ee6..4e7bd32288ae 100644 --- a/include/asm-arm/kprobes.h +++ b/include/asm-arm/kprobes.h | |||
@@ -25,6 +25,12 @@ | |||
25 | #define MAX_INSN_SIZE 2 | 25 | #define MAX_INSN_SIZE 2 |
26 | #define MAX_STACK_SIZE 64 /* 32 would probably be OK */ | 26 | #define MAX_STACK_SIZE 64 /* 32 would probably be OK */ |
27 | 27 | ||
28 | /* | ||
29 | * This undefined instruction must be unique and | ||
30 | * reserved solely for kprobes' use. | ||
31 | */ | ||
32 | #define KPROBE_BREAKPOINT_INSTRUCTION 0xe7f001f8 | ||
33 | |||
28 | #define regs_return_value(regs) ((regs)->ARM_r0) | 34 | #define regs_return_value(regs) ((regs)->ARM_r0) |
29 | #define flush_insn_slot(p) do { } while (0) | 35 | #define flush_insn_slot(p) do { } while (0) |
30 | #define kretprobe_blacklist_size 0 | 36 | #define kretprobe_blacklist_size 0 |
@@ -55,6 +61,7 @@ struct kprobe_ctlblk { | |||
55 | 61 | ||
56 | void arch_remove_kprobe(struct kprobe *); | 62 | void arch_remove_kprobe(struct kprobe *); |
57 | 63 | ||
64 | int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr); | ||
58 | int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr); | 65 | int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr); |
59 | int kprobe_exceptions_notify(struct notifier_block *self, | 66 | int kprobe_exceptions_notify(struct notifier_block *self, |
60 | unsigned long val, void *data); | 67 | unsigned long val, void *data); |