Commit f145d664 authored by David A. Long's avatar David A. Long

ARM: Make the kprobes condition_check symbol names more generic

In preparation for sharing the ARM kprobes instruction interpreting
code with uprobes, make the symbols names less kprobes-specific.
Signed-off-by: default avatarDavid A. Long <dave.long@linaro.org>
Acked-by: default avatarJon Medhurst <tixy@linaro.org>
parent 7579f4b3
...@@ -20,22 +20,23 @@ ...@@ -20,22 +20,23 @@
#define _ASM_PROBES_H #define _ASM_PROBES_H
struct kprobe; struct kprobe;
typedef u32 probes_opcode_t;
struct arch_specific_insn; struct arch_specific_insn;
typedef void (kprobe_insn_handler_t)(kprobe_opcode_t, typedef void (kprobe_insn_handler_t)(probes_opcode_t,
struct arch_specific_insn *, struct arch_specific_insn *,
struct pt_regs *); struct pt_regs *);
typedef unsigned long (kprobe_check_cc)(unsigned long); typedef unsigned long (probes_check_cc)(unsigned long);
typedef void (kprobe_insn_singlestep_t)(kprobe_opcode_t, typedef void (kprobe_insn_singlestep_t)(probes_opcode_t,
struct arch_specific_insn *, struct arch_specific_insn *,
struct pt_regs *); struct pt_regs *);
typedef void (kprobe_insn_fn_t)(void); typedef void (kprobe_insn_fn_t)(void);
/* Architecture specific copy of original instruction. */ /* Architecture specific copy of original instruction. */
struct arch_specific_insn { struct arch_specific_insn {
kprobe_opcode_t *insn; probes_opcode_t *insn;
kprobe_insn_handler_t *insn_handler; kprobe_insn_handler_t *insn_handler;
kprobe_check_cc *insn_check_cc; probes_check_cc *insn_check_cc;
kprobe_insn_singlestep_t *insn_singlestep; kprobe_insn_singlestep_t *insn_singlestep;
kprobe_insn_fn_t *insn_fn; kprobe_insn_fn_t *insn_fn;
}; };
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
#endif #endif
static void __kprobes static void __kprobes
emulate_ldrdstrd(kprobe_opcode_t insn, emulate_ldrdstrd(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
unsigned long pc = regs->ARM_pc + 4; unsigned long pc = regs->ARM_pc + 4;
...@@ -102,7 +102,7 @@ emulate_ldrdstrd(kprobe_opcode_t insn, ...@@ -102,7 +102,7 @@ emulate_ldrdstrd(kprobe_opcode_t insn,
} }
static void __kprobes static void __kprobes
emulate_ldr(kprobe_opcode_t insn, emulate_ldr(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
unsigned long pc = regs->ARM_pc + 4; unsigned long pc = regs->ARM_pc + 4;
...@@ -132,7 +132,7 @@ emulate_ldr(kprobe_opcode_t insn, ...@@ -132,7 +132,7 @@ emulate_ldr(kprobe_opcode_t insn,
} }
static void __kprobes static void __kprobes
emulate_str(kprobe_opcode_t insn, emulate_str(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
unsigned long rtpc = regs->ARM_pc - 4 + str_pc_offset; unsigned long rtpc = regs->ARM_pc - 4 + str_pc_offset;
...@@ -159,7 +159,7 @@ emulate_str(kprobe_opcode_t insn, ...@@ -159,7 +159,7 @@ emulate_str(kprobe_opcode_t insn,
} }
static void __kprobes static void __kprobes
emulate_rd12rn16rm0rs8_rwflags(kprobe_opcode_t insn, emulate_rd12rn16rm0rs8_rwflags(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
unsigned long pc = regs->ARM_pc + 4; unsigned long pc = regs->ARM_pc + 4;
...@@ -194,7 +194,7 @@ emulate_rd12rn16rm0rs8_rwflags(kprobe_opcode_t insn, ...@@ -194,7 +194,7 @@ emulate_rd12rn16rm0rs8_rwflags(kprobe_opcode_t insn,
} }
static void __kprobes static void __kprobes
emulate_rd12rn16rm0_rwflags_nopc(kprobe_opcode_t insn, emulate_rd12rn16rm0_rwflags_nopc(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
int rd = (insn >> 12) & 0xf; int rd = (insn >> 12) & 0xf;
...@@ -221,7 +221,7 @@ emulate_rd12rn16rm0_rwflags_nopc(kprobe_opcode_t insn, ...@@ -221,7 +221,7 @@ emulate_rd12rn16rm0_rwflags_nopc(kprobe_opcode_t insn,
} }
static void __kprobes static void __kprobes
emulate_rd16rn12rm0rs8_rwflags_nopc(kprobe_opcode_t insn, emulate_rd16rn12rm0rs8_rwflags_nopc(probes_opcode_t insn,
struct arch_specific_insn *asi, struct arch_specific_insn *asi,
struct pt_regs *regs) struct pt_regs *regs)
{ {
...@@ -251,7 +251,7 @@ emulate_rd16rn12rm0rs8_rwflags_nopc(kprobe_opcode_t insn, ...@@ -251,7 +251,7 @@ emulate_rd16rn12rm0rs8_rwflags_nopc(kprobe_opcode_t insn,
} }
static void __kprobes static void __kprobes
emulate_rd12rm0_noflags_nopc(kprobe_opcode_t insn, emulate_rd12rm0_noflags_nopc(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
int rd = (insn >> 12) & 0xf; int rd = (insn >> 12) & 0xf;
...@@ -271,7 +271,7 @@ emulate_rd12rm0_noflags_nopc(kprobe_opcode_t insn, ...@@ -271,7 +271,7 @@ emulate_rd12rm0_noflags_nopc(kprobe_opcode_t insn,
} }
static void __kprobes static void __kprobes
emulate_rdlo12rdhi16rn0rm8_rwflags_nopc(kprobe_opcode_t insn, emulate_rdlo12rdhi16rn0rm8_rwflags_nopc(probes_opcode_t insn,
struct arch_specific_insn *asi, struct arch_specific_insn *asi,
struct pt_regs *regs) struct pt_regs *regs)
{ {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "kprobes.h" #include "kprobes.h"
static void __kprobes simulate_ldm1stm1(kprobe_opcode_t insn, static void __kprobes simulate_ldm1stm1(probes_opcode_t insn,
struct arch_specific_insn *asi, struct arch_specific_insn *asi,
struct pt_regs *regs) struct pt_regs *regs)
{ {
...@@ -59,7 +59,7 @@ static void __kprobes simulate_ldm1stm1(kprobe_opcode_t insn, ...@@ -59,7 +59,7 @@ static void __kprobes simulate_ldm1stm1(kprobe_opcode_t insn,
} }
} }
static void __kprobes simulate_stm1_pc(kprobe_opcode_t insn, static void __kprobes simulate_stm1_pc(probes_opcode_t insn,
struct arch_specific_insn *asi, struct arch_specific_insn *asi,
struct pt_regs *regs) struct pt_regs *regs)
{ {
...@@ -70,7 +70,7 @@ static void __kprobes simulate_stm1_pc(kprobe_opcode_t insn, ...@@ -70,7 +70,7 @@ static void __kprobes simulate_stm1_pc(kprobe_opcode_t insn,
regs->ARM_pc = (long)addr + 4; regs->ARM_pc = (long)addr + 4;
} }
static void __kprobes simulate_ldm1_pc(kprobe_opcode_t insn, static void __kprobes simulate_ldm1_pc(probes_opcode_t insn,
struct arch_specific_insn *asi, struct arch_specific_insn *asi,
struct pt_regs *regs) struct pt_regs *regs)
{ {
...@@ -79,7 +79,7 @@ static void __kprobes simulate_ldm1_pc(kprobe_opcode_t insn, ...@@ -79,7 +79,7 @@ static void __kprobes simulate_ldm1_pc(kprobe_opcode_t insn,
} }
static void __kprobes static void __kprobes
emulate_generic_r0_12_noflags(kprobe_opcode_t insn, emulate_generic_r0_12_noflags(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
register void *rregs asm("r1") = regs; register void *rregs asm("r1") = regs;
...@@ -107,7 +107,7 @@ emulate_generic_r0_12_noflags(kprobe_opcode_t insn, ...@@ -107,7 +107,7 @@ emulate_generic_r0_12_noflags(kprobe_opcode_t insn,
} }
static void __kprobes static void __kprobes
emulate_generic_r2_14_noflags(kprobe_opcode_t insn, emulate_generic_r2_14_noflags(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
emulate_generic_r0_12_noflags(insn, asi, emulate_generic_r0_12_noflags(insn, asi,
...@@ -115,7 +115,7 @@ emulate_generic_r2_14_noflags(kprobe_opcode_t insn, ...@@ -115,7 +115,7 @@ emulate_generic_r2_14_noflags(kprobe_opcode_t insn,
} }
static void __kprobes static void __kprobes
emulate_ldm_r3_15(kprobe_opcode_t insn, emulate_ldm_r3_15(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
emulate_generic_r0_12_noflags(insn, asi, emulate_generic_r0_12_noflags(insn, asi,
...@@ -124,7 +124,7 @@ emulate_ldm_r3_15(kprobe_opcode_t insn, ...@@ -124,7 +124,7 @@ emulate_ldm_r3_15(kprobe_opcode_t insn,
} }
enum kprobe_insn __kprobes enum kprobe_insn __kprobes
kprobe_decode_ldmstm(kprobe_opcode_t insn, struct arch_specific_insn *asi, kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi,
const struct decode_header *h) const struct decode_header *h)
{ {
kprobe_insn_handler_t *handler = 0; kprobe_insn_handler_t *handler = 0;
......
This diff is collapsed.
...@@ -36,22 +36,22 @@ enum kprobe_insn { ...@@ -36,22 +36,22 @@ enum kprobe_insn {
INSN_GOOD_NO_SLOT INSN_GOOD_NO_SLOT
}; };
typedef enum kprobe_insn (kprobe_decode_insn_t)(kprobe_opcode_t, typedef enum kprobe_insn (kprobe_decode_insn_t)(probes_opcode_t,
struct arch_specific_insn *, struct arch_specific_insn *,
const union decode_action *); const union decode_action *);
#ifdef CONFIG_THUMB2_KERNEL #ifdef CONFIG_THUMB2_KERNEL
enum kprobe_insn thumb16_kprobe_decode_insn(kprobe_opcode_t, enum kprobe_insn thumb16_kprobe_decode_insn(probes_opcode_t,
struct arch_specific_insn *, struct arch_specific_insn *,
const union decode_action *); const union decode_action *);
enum kprobe_insn thumb32_kprobe_decode_insn(kprobe_opcode_t, enum kprobe_insn thumb32_kprobe_decode_insn(probes_opcode_t,
struct arch_specific_insn *, struct arch_specific_insn *,
const union decode_action *); const union decode_action *);
#else /* !CONFIG_THUMB2_KERNEL */ #else /* !CONFIG_THUMB2_KERNEL */
enum kprobe_insn arm_kprobe_decode_insn(kprobe_opcode_t, enum kprobe_insn arm_kprobe_decode_insn(probes_opcode_t,
struct arch_specific_insn *, struct arch_specific_insn *,
const union decode_action *); const union decode_action *);
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
* read and write of flags. * read and write of flags.
*/ */
void __kprobes simulate_bbl(kprobe_opcode_t insn, void __kprobes simulate_bbl(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
long iaddr = (long) regs->ARM_pc - 4; long iaddr = (long) regs->ARM_pc - 4;
...@@ -69,7 +69,7 @@ void __kprobes simulate_bbl(kprobe_opcode_t insn, ...@@ -69,7 +69,7 @@ void __kprobes simulate_bbl(kprobe_opcode_t insn,
regs->ARM_pc = iaddr + 8 + disp; regs->ARM_pc = iaddr + 8 + disp;
} }
void __kprobes simulate_blx1(kprobe_opcode_t insn, void __kprobes simulate_blx1(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
long iaddr = (long) regs->ARM_pc - 4; long iaddr = (long) regs->ARM_pc - 4;
...@@ -80,7 +80,7 @@ void __kprobes simulate_blx1(kprobe_opcode_t insn, ...@@ -80,7 +80,7 @@ void __kprobes simulate_blx1(kprobe_opcode_t insn,
regs->ARM_cpsr |= PSR_T_BIT; regs->ARM_cpsr |= PSR_T_BIT;
} }
void __kprobes simulate_blx2bx(kprobe_opcode_t insn, void __kprobes simulate_blx2bx(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
int rm = insn & 0xf; int rm = insn & 0xf;
...@@ -95,7 +95,7 @@ void __kprobes simulate_blx2bx(kprobe_opcode_t insn, ...@@ -95,7 +95,7 @@ void __kprobes simulate_blx2bx(kprobe_opcode_t insn,
regs->ARM_cpsr |= PSR_T_BIT; regs->ARM_cpsr |= PSR_T_BIT;
} }
void __kprobes simulate_mrs(kprobe_opcode_t insn, void __kprobes simulate_mrs(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
int rd = (insn >> 12) & 0xf; int rd = (insn >> 12) & 0xf;
...@@ -103,7 +103,7 @@ void __kprobes simulate_mrs(kprobe_opcode_t insn, ...@@ -103,7 +103,7 @@ void __kprobes simulate_mrs(kprobe_opcode_t insn,
regs->uregs[rd] = regs->ARM_cpsr & mask; regs->uregs[rd] = regs->ARM_cpsr & mask;
} }
void __kprobes simulate_mov_ipsp(kprobe_opcode_t insn, void __kprobes simulate_mov_ipsp(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
regs->uregs[12] = regs->uregs[13]; regs->uregs[12] = regs->uregs[13];
...@@ -704,7 +704,7 @@ const union decode_item kprobe_decode_arm_table[] = { ...@@ -704,7 +704,7 @@ const union decode_item kprobe_decode_arm_table[] = {
EXPORT_SYMBOL_GPL(kprobe_decode_arm_table); EXPORT_SYMBOL_GPL(kprobe_decode_arm_table);
#endif #endif
static void __kprobes arm_singlestep(kprobe_opcode_t insn, static void __kprobes arm_singlestep(probes_opcode_t insn,
struct arch_specific_insn *asi, struct pt_regs *regs) struct arch_specific_insn *asi, struct pt_regs *regs)
{ {
regs->ARM_pc += 4; regs->ARM_pc += 4;
...@@ -724,11 +724,11 @@ static void __kprobes arm_singlestep(kprobe_opcode_t insn, ...@@ -724,11 +724,11 @@ static void __kprobes arm_singlestep(kprobe_opcode_t insn,
* should also be very rare. * should also be very rare.
*/ */
enum kprobe_insn __kprobes enum kprobe_insn __kprobes
arm_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, arm_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
const union decode_action *actions) const union decode_action *actions)
{ {
asi->insn_singlestep = arm_singlestep; asi->insn_singlestep = arm_singlestep;
asi->insn_check_cc = kprobe_condition_checks[insn>>28]; asi->insn_check_cc = probes_condition_checks[insn>>28];
return kprobe_decode_insn(insn, asi, kprobe_decode_arm_table, false, return kprobe_decode_insn(insn, asi, kprobe_decode_arm_table, false,
actions); actions);
} }
...@@ -53,15 +53,15 @@ enum probes_arm_action { ...@@ -53,15 +53,15 @@ enum probes_arm_action {
NUM_PROBES_ARM_ACTIONS NUM_PROBES_ARM_ACTIONS
}; };
void __kprobes simulate_bbl(kprobe_opcode_t opcode, void __kprobes simulate_bbl(probes_opcode_t opcode,
struct arch_specific_insn *asi, struct pt_regs *regs); struct arch_specific_insn *asi, struct pt_regs *regs);
void __kprobes simulate_blx1(kprobe_opcode_t opcode, void __kprobes simulate_blx1(probes_opcode_t opcode,
struct arch_specific_insn *asi, struct pt_regs *regs); struct arch_specific_insn *asi, struct pt_regs *regs);
void __kprobes simulate_blx2bx(kprobe_opcode_t opcode, void __kprobes simulate_blx2bx(probes_opcode_t opcode,
struct arch_specific_insn *asi, struct pt_regs *regs); struct arch_specific_insn *asi, struct pt_regs *regs);
void __kprobes simulate_mrs(kprobe_opcode_t opcode, void __kprobes simulate_mrs(probes_opcode_t opcode,
struct arch_specific_insn *asi, struct pt_regs *regs); struct arch_specific_insn *asi, struct pt_regs *regs);
void __kprobes simulate_mov_ipsp(kprobe_opcode_t opcode, void __kprobes simulate_mov_ipsp(probes_opcode_t opcode,
struct arch_specific_insn *asi, struct pt_regs *regs); struct arch_specific_insn *asi, struct pt_regs *regs);
#endif #endif
...@@ -839,11 +839,11 @@ EXPORT_SYMBOL_GPL(kprobe_decode_thumb16_table); ...@@ -839,11 +839,11 @@ EXPORT_SYMBOL_GPL(kprobe_decode_thumb16_table);
static unsigned long __kprobes thumb_check_cc(unsigned long cpsr) static unsigned long __kprobes thumb_check_cc(unsigned long cpsr)
{ {
if (unlikely(in_it_block(cpsr))) if (unlikely(in_it_block(cpsr)))
return kprobe_condition_checks[current_cond(cpsr)](cpsr); return probes_condition_checks[current_cond(cpsr)](cpsr);
return true; return true;
} }
static void __kprobes thumb16_singlestep(kprobe_opcode_t opcode, static void __kprobes thumb16_singlestep(probes_opcode_t opcode,
struct arch_specific_insn *asi, struct arch_specific_insn *asi,
struct pt_regs *regs) struct pt_regs *regs)
{ {
...@@ -852,7 +852,7 @@ static void __kprobes thumb16_singlestep(kprobe_opcode_t opcode, ...@@ -852,7 +852,7 @@ static void __kprobes thumb16_singlestep(kprobe_opcode_t opcode,
regs->ARM_cpsr = it_advance(regs->ARM_cpsr); regs->ARM_cpsr = it_advance(regs->ARM_cpsr);
} }
static void __kprobes thumb32_singlestep(kprobe_opcode_t opcode, static void __kprobes thumb32_singlestep(probes_opcode_t opcode,
struct arch_specific_insn *asi, struct arch_specific_insn *asi,
struct pt_regs *regs) struct pt_regs *regs)
{ {
...@@ -862,7 +862,7 @@ static void __kprobes thumb32_singlestep(kprobe_opcode_t opcode, ...@@ -862,7 +862,7 @@ static void __kprobes thumb32_singlestep(kprobe_opcode_t opcode,
} }
enum kprobe_insn __kprobes enum kprobe_insn __kprobes
thumb16_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, thumb16_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
const union decode_action *actions) const union decode_action *actions)
{ {
asi->insn_singlestep = thumb16_singlestep; asi->insn_singlestep = thumb16_singlestep;
...@@ -872,7 +872,7 @@ thumb16_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, ...@@ -872,7 +872,7 @@ thumb16_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi,
} }
enum kprobe_insn __kprobes enum kprobe_insn __kprobes
thumb32_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, thumb32_kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
const union decode_action *actions) const union decode_action *actions)
{ {
asi->insn_singlestep = thumb32_singlestep; asi->insn_singlestep = thumb32_singlestep;
......
...@@ -167,7 +167,7 @@ static unsigned long __kprobes __check_al(unsigned long cpsr) ...@@ -167,7 +167,7 @@ static unsigned long __kprobes __check_al(unsigned long cpsr)
return true; return true;
} }
kprobe_check_cc * const kprobe_condition_checks[16] = { probes_check_cc * const probes_condition_checks[16] = {
&__check_eq, &__check_ne, &__check_cs, &__check_cc, &__check_eq, &__check_ne, &__check_cs, &__check_cc,
&__check_mi, &__check_pl, &__check_vs, &__check_vc, &__check_mi, &__check_pl, &__check_vs, &__check_vc,
&__check_hi, &__check_ls, &__check_ge, &__check_lt, &__check_hi, &__check_ls, &__check_ge, &__check_lt,
...@@ -175,13 +175,13 @@ kprobe_check_cc * const kprobe_condition_checks[16] = { ...@@ -175,13 +175,13 @@ kprobe_check_cc * const kprobe_condition_checks[16] = {
}; };
void __kprobes kprobe_simulate_nop(kprobe_opcode_t opcode, void __kprobes kprobe_simulate_nop(probes_opcode_t opcode,
struct arch_specific_insn *asi, struct arch_specific_insn *asi,
struct pt_regs *regs) struct pt_regs *regs)
{ {
} }
void __kprobes kprobe_emulate_none(kprobe_opcode_t opcode, void __kprobes kprobe_emulate_none(probes_opcode_t opcode,
struct arch_specific_insn *asi, struct arch_specific_insn *asi,
struct pt_regs *regs) struct pt_regs *regs)
{ {
...@@ -195,8 +195,8 @@ void __kprobes kprobe_emulate_none(kprobe_opcode_t opcode, ...@@ -195,8 +195,8 @@ void __kprobes kprobe_emulate_none(kprobe_opcode_t opcode,
* unconditional as the condition code will already be checked before any * unconditional as the condition code will already be checked before any
* emulation handler is called. * emulation handler is called.
*/ */
static kprobe_opcode_t __kprobes static probes_opcode_t __kprobes
prepare_emulated_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, prepare_emulated_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
bool thumb) bool thumb)
{ {
#ifdef CONFIG_THUMB2_KERNEL #ifdef CONFIG_THUMB2_KERNEL
...@@ -221,7 +221,7 @@ prepare_emulated_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, ...@@ -221,7 +221,7 @@ prepare_emulated_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi,
* prepare_emulated_insn * prepare_emulated_insn
*/ */
static void __kprobes static void __kprobes
set_emulated_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, set_emulated_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
bool thumb) bool thumb)
{ {
#ifdef CONFIG_THUMB2_KERNEL #ifdef CONFIG_THUMB2_KERNEL
...@@ -257,14 +257,14 @@ set_emulated_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, ...@@ -257,14 +257,14 @@ set_emulated_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi,
* non-zero value, the corresponding nibble in pinsn is validated and modified * non-zero value, the corresponding nibble in pinsn is validated and modified
* according to the type. * according to the type.
*/ */
static bool __kprobes decode_regs(kprobe_opcode_t *pinsn, u32 regs) static bool __kprobes decode_regs(probes_opcode_t *pinsn, u32 regs)
{ {
kprobe_opcode_t insn = *pinsn; probes_opcode_t insn = *pinsn;
kprobe_opcode_t mask = 0xf; /* Start at least significant nibble */ probes_opcode_t mask = 0xf; /* Start at least significant nibble */
for (; regs != 0; regs >>= 4, mask <<= 4) { for (; regs != 0; regs >>= 4, mask <<= 4) {
kprobe_opcode_t new_bits = INSN_NEW_BITS; probes_opcode_t new_bits = INSN_NEW_BITS;
switch (regs & 0xf) { switch (regs & 0xf) {
...@@ -383,7 +383,7 @@ static const int decode_struct_sizes[NUM_DECODE_TYPES] = { ...@@ -383,7 +383,7 @@ static const int decode_struct_sizes[NUM_DECODE_TYPES] = {
* *
*/ */
int __kprobes int __kprobes
kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
const union decode_item *table, bool thumb, const union decode_item *table, bool thumb,
const union decode_action *actions) const union decode_action *actions)
{ {
......
...@@ -131,13 +131,13 @@ static inline void __kprobes alu_write_pc(long pcv, struct pt_regs *regs) ...@@ -131,13 +131,13 @@ static inline void __kprobes alu_write_pc(long pcv, struct pt_regs *regs)
} }
void __kprobes kprobe_simulate_nop(kprobe_opcode_t, struct arch_specific_insn *, void __kprobes kprobe_simulate_nop(probes_opcode_t, struct arch_specific_insn *,
struct pt_regs *regs); struct pt_regs *regs);
void __kprobes kprobe_emulate_none(kprobe_opcode_t, struct arch_specific_insn *, void __kprobes kprobe_emulate_none(probes_opcode_t, struct arch_specific_insn *,
struct pt_regs *regs); struct pt_regs *regs);
enum kprobe_insn __kprobes enum kprobe_insn __kprobes
kprobe_decode_ldmstm(kprobe_opcode_t insn, struct arch_specific_insn *asi, kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi,
const struct decode_header *h); const struct decode_header *h);
/* /*
...@@ -311,7 +311,7 @@ union decode_item { ...@@ -311,7 +311,7 @@ union decode_item {
int action; int action;
}; };
typedef enum kprobe_insn (probes_custom_decode_t)(kprobe_opcode_t, typedef enum kprobe_insn (probes_custom_decode_t)(probes_opcode_t,
struct arch_specific_insn *, struct arch_specific_insn *,
const struct decode_header *); const struct decode_header *);
...@@ -408,10 +408,10 @@ extern const union decode_item kprobe_decode_arm_table[]; ...@@ -408,10 +408,10 @@ extern const union decode_item kprobe_decode_arm_table[];
extern const union decode_action kprobes_arm_actions[]; extern const union decode_action kprobes_arm_actions[];
#endif #endif
extern kprobe_check_cc * const kprobe_condition_checks[16]; extern probes_check_cc * const probes_condition_checks[16];
int kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi, int kprobe_decode_insn(probes_opcode_t insn, struct arch_specific_insn *asi,
const union decode_item *table, bool thumb16, const union decode_item *table, bool thumb16,
const union decode_action *actions); const union decode_action *actions);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment