summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/kprobes-common.c
diff options
context:
space:
mode:
authorDavid A. Long <dave.long@linaro.org>2014-03-06 03:41:29 +0100
committerDavid A. Long <dave.long@linaro.org>2014-03-18 21:39:40 +0100
commitb4cd605ca92d9a8a2f71355cb45dd943ebcb0c97 (patch)
tree01f6832e2d9f98344b5913efdb257447f4241742 /arch/arm/kernel/kprobes-common.c
parentARM: Add an emulate flag to the kprobes/uprobes instruction decode functions (diff)
downloadlinux-b4cd605ca92d9a8a2f71355cb45dd943ebcb0c97.tar.xz
linux-b4cd605ca92d9a8a2f71355cb45dd943ebcb0c97.zip
ARM: Make arch_specific_insn a define for new arch_probes_insn structure
Because the common underlying code for ARM kprobes and uprobes needs to share a common architecrure-specific context structure, and because the generic kprobes include file insists on defining this to a dummy structure when kprobes is not configured, a new common structure is required which can exist when uprobes is configured without kprobes. In this case kprobes will define a dummy structure, but without the define aliasing the two structure tags it will not affect uprobes and the shared probes code. Signed-off-by: David A. Long <dave.long@linaro.org> Acked-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'arch/arm/kernel/kprobes-common.c')
-rw-r--r--arch/arm/kernel/kprobes-common.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/kernel/kprobes-common.c b/arch/arm/kernel/kprobes-common.c
index 6159725597a1..c311ed94ff1c 100644
--- a/arch/arm/kernel/kprobes-common.c
+++ b/arch/arm/kernel/kprobes-common.c
@@ -18,7 +18,7 @@
static void __kprobes simulate_ldm1stm1(probes_opcode_t insn,
- struct arch_specific_insn *asi,
+ struct arch_probes_insn *asi,
struct pt_regs *regs)
{
int rn = (insn >> 16) & 0xf;
@@ -60,7 +60,7 @@ static void __kprobes simulate_ldm1stm1(probes_opcode_t insn,
}
static void __kprobes simulate_stm1_pc(probes_opcode_t insn,
- struct arch_specific_insn *asi,
+ struct arch_probes_insn *asi,
struct pt_regs *regs)
{
unsigned long addr = regs->ARM_pc - 4;
@@ -71,7 +71,7 @@ static void __kprobes simulate_stm1_pc(probes_opcode_t insn,
}
static void __kprobes simulate_ldm1_pc(probes_opcode_t insn,
- struct arch_specific_insn *asi,
+ struct arch_probes_insn *asi,
struct pt_regs *regs)
{
simulate_ldm1stm1(insn, asi, regs);
@@ -80,7 +80,7 @@ static void __kprobes simulate_ldm1_pc(probes_opcode_t insn,
static void __kprobes
emulate_generic_r0_12_noflags(probes_opcode_t insn,
- struct arch_specific_insn *asi, struct pt_regs *regs)
+ struct arch_probes_insn *asi, struct pt_regs *regs)
{
register void *rregs asm("r1") = regs;
register void *rfn asm("lr") = asi->insn_fn;
@@ -108,7 +108,7 @@ emulate_generic_r0_12_noflags(probes_opcode_t insn,
static void __kprobes
emulate_generic_r2_14_noflags(probes_opcode_t insn,
- struct arch_specific_insn *asi, struct pt_regs *regs)
+ struct arch_probes_insn *asi, struct pt_regs *regs)
{
emulate_generic_r0_12_noflags(insn, asi,
(struct pt_regs *)(regs->uregs+2));
@@ -116,7 +116,7 @@ emulate_generic_r2_14_noflags(probes_opcode_t insn,
static void __kprobes
emulate_ldm_r3_15(probes_opcode_t insn,
- struct arch_specific_insn *asi, struct pt_regs *regs)
+ struct arch_probes_insn *asi, struct pt_regs *regs)
{
emulate_generic_r0_12_noflags(insn, asi,
(struct pt_regs *)(regs->uregs+3));
@@ -124,7 +124,7 @@ emulate_ldm_r3_15(probes_opcode_t insn,
}
enum probes_insn __kprobes
-kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi,
+kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_probes_insn *asi,
const struct decode_header *h)
{
probes_insn_handler_t *handler = 0;