Skip to content

Commit eb73ea9

Browse files
author
David A. Long
committed
ARM: Change more ARM kprobes symbol names to something more generic
Change kprobe_emulate_none, kprobe_simulate_nop, and arm_kprobe_decode_init function names to something more appropriate for code being shared outside of the kprobes subsystem. Also, move the new arm_probes_decode_init declaration out of the kprobes.h include file and into the probes.h include file. Signed-off-by: David A. Long <dave.long@linaro.org> Acked-by: Jon Medhurst <tixy@linaro.org>
1 parent f145d66 commit eb73ea9

6 files changed

Lines changed: 19 additions & 19 deletions

File tree

‎arch/arm/kernel/kprobes-arm.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,10 @@ emulate_rdlo12rdhi16rn0rm8_rwflags_nopc(probes_opcode_t insn,
302302
}
303303

304304
const union decode_action kprobes_arm_actions[NUM_PROBES_ARM_ACTIONS] = {
305-
[PROBES_EMULATE_NONE] = {.handler = kprobe_emulate_none},
306-
[PROBES_SIMULATE_NOP] = {.handler = kprobe_simulate_nop},
307-
[PROBES_PRELOAD_IMM] = {.handler = kprobe_simulate_nop},
308-
[PROBES_PRELOAD_REG] = {.handler = kprobe_simulate_nop},
305+
[PROBES_EMULATE_NONE] = {.handler = probes_emulate_none},
306+
[PROBES_SIMULATE_NOP] = {.handler = probes_simulate_nop},
307+
[PROBES_PRELOAD_IMM] = {.handler = probes_simulate_nop},
308+
[PROBES_PRELOAD_REG] = {.handler = probes_simulate_nop},
309309
[PROBES_BRANCH_IMM] = {.handler = simulate_blx1},
310310
[PROBES_MRS] = {.handler = simulate_mrs},
311311
[PROBES_BRANCH_REG] = {.handler = simulate_blx2bx},
@@ -326,8 +326,8 @@ const union decode_action kprobes_arm_actions[NUM_PROBES_ARM_ACTIONS] = {
326326
[PROBES_DATA_PROCESSING_IMM] = {
327327
.handler = emulate_rd12rn16rm0rs8_rwflags},
328328
[PROBES_MOV_HALFWORD] = {.handler = emulate_rd12rm0_noflags_nopc},
329-
[PROBES_SEV] = {.handler = kprobe_emulate_none},
330-
[PROBES_WFE] = {.handler = kprobe_simulate_nop},
329+
[PROBES_SEV] = {.handler = probes_emulate_none},
330+
[PROBES_WFE] = {.handler = probes_simulate_nop},
331331
[PROBES_SATURATE] = {.handler = emulate_rd12rn16rm0_rwflags_nopc},
332332
[PROBES_REV] = {.handler = emulate_rd12rm0_noflags_nopc},
333333
[PROBES_MMI] = {.handler = emulate_rd12rn16rm0_rwflags_nopc},

‎arch/arm/kernel/kprobes-thumb.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,8 @@ const union decode_action kprobes_t16_actions[NUM_PROBES_T16_ACTIONS] = {
613613
[PROBES_T16_SIGN_EXTEND] = {.handler = t16_emulate_loregs_rwflags},
614614
[PROBES_T16_PUSH] = {.decoder = t16_decode_push},
615615
[PROBES_T16_POP] = {.decoder = t16_decode_pop},
616-
[PROBES_T16_SEV] = {.handler = kprobe_emulate_none},
617-
[PROBES_T16_WFE] = {.handler = kprobe_simulate_nop},
616+
[PROBES_T16_SEV] = {.handler = probes_emulate_none},
617+
[PROBES_T16_WFE] = {.handler = probes_simulate_nop},
618618
[PROBES_T16_IT] = {.decoder = t16_decode_it},
619619
[PROBES_T16_CMP] = {.handler = t16_emulate_loregs_rwflags},
620620
[PROBES_T16_ADDSUB] = {.handler = t16_emulate_loregs_noitrwflags},
@@ -644,12 +644,12 @@ const union decode_action kprobes_t32_actions[NUM_PROBES_T32_ACTIONS] = {
644644
[PROBES_T32_MOVW] = {.handler = t32_emulate_rd8rn16_noflags},
645645
[PROBES_T32_SAT] = {.handler = t32_emulate_rd8rn16rm0_rwflags},
646646
[PROBES_T32_BITFIELD] = {.handler = t32_emulate_rd8rn16_noflags},
647-
[PROBES_T32_SEV] = {.handler = kprobe_emulate_none},
648-
[PROBES_T32_WFE] = {.handler = kprobe_simulate_nop},
647+
[PROBES_T32_SEV] = {.handler = probes_emulate_none},
648+
[PROBES_T32_WFE] = {.handler = probes_simulate_nop},
649649
[PROBES_T32_MRS] = {.handler = t32_simulate_mrs},
650650
[PROBES_T32_BRANCH_COND] = {.decoder = t32_decode_cond_branch},
651651
[PROBES_T32_BRANCH] = {.handler = t32_simulate_branch},
652-
[PROBES_T32_PLDI] = {.handler = kprobe_simulate_nop},
652+
[PROBES_T32_PLDI] = {.handler = probes_simulate_nop},
653653
[PROBES_T32_LDR_LIT] = {.handler = t32_simulate_ldr_literal},
654654
[PROBES_T32_LDRSTR] = {.handler = t32_emulate_ldrstr},
655655
[PROBES_T32_SIGN_EXTEND] = {.handler = t32_emulate_rd8rn16rm0_rwflags},

‎arch/arm/kernel/kprobes.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ static struct undef_hook kprobes_arm_break_hook = {
614614

615615
int __init arch_init_kprobes()
616616
{
617-
arm_kprobe_decode_init();
617+
arm_probes_decode_init();
618618
#ifdef CONFIG_THUMB2_KERNEL
619619
register_undef_hook(&kprobes_thumb16_break_hook);
620620
register_undef_hook(&kprobes_thumb32_break_hook);

‎arch/arm/kernel/kprobes.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ enum kprobe_insn arm_kprobe_decode_insn(probes_opcode_t,
5757

5858
#endif
5959

60-
void __init arm_kprobe_decode_init(void);
61-
6260
#include "probes.h"
6361

6462
#endif /* _ARM_KERNEL_KPROBES_H */

‎arch/arm/kernel/probes.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void __init test_alu_write_pc_interworking(void)
7676
#endif /* !test_alu_write_pc_interworking */
7777

7878

79-
void __init arm_kprobe_decode_init(void)
79+
void __init arm_probes_decode_init(void)
8080
{
8181
find_str_pc_offset();
8282
test_load_write_pc_interworking();
@@ -175,13 +175,13 @@ probes_check_cc * const probes_condition_checks[16] = {
175175
};
176176

177177

178-
void __kprobes kprobe_simulate_nop(probes_opcode_t opcode,
178+
void __kprobes probes_simulate_nop(probes_opcode_t opcode,
179179
struct arch_specific_insn *asi,
180180
struct pt_regs *regs)
181181
{
182182
}
183183

184-
void __kprobes kprobe_emulate_none(probes_opcode_t opcode,
184+
void __kprobes probes_emulate_none(probes_opcode_t opcode,
185185
struct arch_specific_insn *asi,
186186
struct pt_regs *regs)
187187
{

‎arch/arm/kernel/probes.h‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include <linux/kprobes.h>
2525
#include "kprobes.h"
2626

27+
void __init arm_probes_decode_init(void);
28+
2729
#if __LINUX_ARM_ARCH__ >= 7
2830

2931
/* str_pc_offset is architecturally defined from ARMv7 onwards */
@@ -131,9 +133,9 @@ static inline void __kprobes alu_write_pc(long pcv, struct pt_regs *regs)
131133
}
132134

133135

134-
void __kprobes kprobe_simulate_nop(probes_opcode_t, struct arch_specific_insn *,
136+
void __kprobes probes_simulate_nop(probes_opcode_t, struct arch_specific_insn *,
135137
struct pt_regs *regs);
136-
void __kprobes kprobe_emulate_none(probes_opcode_t, struct arch_specific_insn *,
138+
void __kprobes probes_emulate_none(probes_opcode_t, struct arch_specific_insn *,
137139
struct pt_regs *regs);
138140

139141
enum kprobe_insn __kprobes

0 commit comments

Comments
 (0)