Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47e190fa authored by David A. Long's avatar David A. Long
Browse files

ARM: Change the remaining shared kprobes/uprobes symbols to something generic



Any more ARM kprobes/uprobes symbols which have "kprobe" in the name must be
changed to the more generic "probes" or other non-kprobes specific symbol.

Signed-off-by: default avatarDavid A. Long <dave.long@linaro.org>
Acked-by: default avatarJon Medhurst <tixy@linaro.org>
parent 44a0a59c
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -19,26 +19,25 @@
#ifndef _ASM_PROBES_H
#define _ASM_PROBES_H

struct kprobe;
typedef u32 probes_opcode_t;

struct arch_specific_insn;
typedef void (kprobe_insn_handler_t)(probes_opcode_t,
typedef void (probes_insn_handler_t)(probes_opcode_t,
				     struct arch_specific_insn *,
				     struct pt_regs *);
typedef unsigned long (probes_check_cc)(unsigned long);
typedef void (kprobe_insn_singlestep_t)(probes_opcode_t,
typedef void (probes_insn_singlestep_t)(probes_opcode_t,
					struct arch_specific_insn *,
					struct pt_regs *);
typedef void (kprobe_insn_fn_t)(void);
typedef void (probes_insn_fn_t)(void);

/* Architecture specific copy of original instruction. */
struct arch_specific_insn {
	probes_opcode_t			*insn;
	kprobe_insn_handler_t		*insn_handler;
	probes_insn_handler_t		*insn_handler;
	probes_check_cc			*insn_check_cc;
	kprobe_insn_singlestep_t	*insn_singlestep;
	kprobe_insn_fn_t		*insn_fn;
	probes_insn_singlestep_t	*insn_singlestep;
	probes_insn_fn_t		*insn_fn;
};

#endif
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ enum probes_insn __kprobes
kprobe_decode_ldmstm(probes_opcode_t insn, struct arch_specific_insn *asi,
		const struct decode_header *h)
{
	kprobe_insn_handler_t *handler = 0;
	probes_insn_handler_t *handler = 0;
	unsigned reglist = insn & 0xffff;
	int is_ldm = insn & 0x100000;
	int rn = (insn >> 16) & 0xf;
+5 −3
Original line number Diff line number Diff line
@@ -207,6 +207,8 @@
#include <asm/opcodes.h>

#include "kprobes.h"
#include "probes-arm.h"
#include "probes-thumb.h"
#include "kprobes-test.h"


@@ -1610,7 +1612,7 @@ static int __init run_all_tests(void)
		goto out;

	pr_info("ARM instruction simulation\n");
	ret = run_test_cases(kprobe_arm_test_cases, kprobe_decode_arm_table);
	ret = run_test_cases(kprobe_arm_test_cases, probes_decode_arm_table);
	if (ret)
		goto out;

@@ -1633,13 +1635,13 @@ static int __init run_all_tests(void)

	pr_info("16-bit Thumb instruction simulation\n");
	ret = run_test_cases(kprobe_thumb16_test_cases,
				kprobe_decode_thumb16_table);
				probes_decode_thumb16_table);
	if (ret)
		goto out;

	pr_info("32-bit Thumb instruction simulation\n");
	ret = run_test_cases(kprobe_thumb32_test_cases,
				kprobe_decode_thumb32_table);
				probes_decode_thumb32_table);
	if (ret)
		goto out;
#endif
+6 −4
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@
#include <linux/bug.h>

#include "kprobes.h"
#include "probes-arm.h"
#include "probes-thumb.h"
#include "patch.h"

#define MIN_STACK_SIZE(addr) 				\
@@ -69,10 +71,10 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
	if (is_wide_instruction(insn)) {
		insn <<= 16;
		insn |= ((u16 *)addr)[1];
		decode_insn = thumb32_kprobe_decode_insn;
		decode_insn = thumb32_probes_decode_insn;
		actions = kprobes_t32_actions;
	} else {
		decode_insn = thumb16_kprobe_decode_insn;
		decode_insn = thumb16_probes_decode_insn;
		actions = kprobes_t16_actions;
	}
#else /* !CONFIG_THUMB2_KERNEL */
@@ -80,7 +82,7 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
	if (addr & 0x3)
		return -EINVAL;
	insn = *p->addr;
	decode_insn = arm_kprobe_decode_insn;
	decode_insn = arm_probes_decode_insn;
	actions = kprobes_arm_actions;
#endif

@@ -99,7 +101,7 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
			p->ainsn.insn[is] = tmp_insn[is];
		flush_insns(p->ainsn.insn,
				sizeof(p->ainsn.insn[0]) * MAX_INSN_SIZE);
		p->ainsn.insn_fn = (kprobe_insn_fn_t *)
		p->ainsn.insn_fn = (probes_insn_fn_t *)
					((uintptr_t)p->ainsn.insn | thumb);
		break;

+8 −13
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@
#ifndef _ARM_KERNEL_KPROBES_H
#define _ARM_KERNEL_KPROBES_H

#include "probes.h"

/*
 * These undefined instructions must be unique and
 * reserved solely for kprobes' use.
@@ -27,8 +29,9 @@
#define KPROBE_THUMB16_BREAKPOINT_INSTRUCTION	0xde18
#define KPROBE_THUMB32_BREAKPOINT_INSTRUCTION	0xf7f0a018

struct decode_header;
union decode_action;
enum probes_insn __kprobes
kprobe_decode_ldmstm(kprobe_opcode_t insn, struct arch_specific_insn *asi,
		const struct decode_header *h);

typedef enum probes_insn (kprobe_decode_insn_t)(probes_opcode_t,
						struct arch_specific_insn *,
@@ -36,21 +39,13 @@ typedef enum probes_insn (kprobe_decode_insn_t)(probes_opcode_t,

#ifdef CONFIG_THUMB2_KERNEL

enum probes_insn thumb16_kprobe_decode_insn(probes_opcode_t,
					    struct arch_specific_insn *,
					    const union decode_action *);
enum probes_insn thumb32_kprobe_decode_insn(probes_opcode_t,
					    struct arch_specific_insn *,
					    const union decode_action *);
extern const union decode_action kprobes_t32_actions[];
extern const union decode_action kprobes_t16_actions[];

#else /* !CONFIG_THUMB2_KERNEL */

enum probes_insn arm_kprobe_decode_insn(probes_opcode_t,
					struct arch_specific_insn *,
					const union decode_action *);
extern const union decode_action kprobes_arm_actions[];

#endif

#include "probes.h"

#endif /* _ARM_KERNEL_KPROBES_H */
Loading