2011-04-20 17:52:38 +08:00
|
|
|
/*
|
|
|
|
* arch/arm/kernel/kprobes.h
|
|
|
|
*
|
2011-04-26 22:15:56 +08:00
|
|
|
* Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>.
|
|
|
|
*
|
|
|
|
* Some contents moved here from arch/arm/include/asm/kprobes.h which is
|
2011-04-20 17:52:38 +08:00
|
|
|
* Copyright (C) 2006, 2007 Motorola Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ARM_KERNEL_KPROBES_H
|
|
|
|
#define _ARM_KERNEL_KPROBES_H
|
|
|
|
|
|
|
|
/*
|
2011-04-20 00:18:35 +08:00
|
|
|
* These undefined instructions must be unique and
|
2011-04-20 17:52:38 +08:00
|
|
|
* reserved solely for kprobes' use.
|
|
|
|
*/
|
2011-06-17 00:22:37 +08:00
|
|
|
#define KPROBE_ARM_BREAKPOINT_INSTRUCTION 0x07f001f8
|
2011-04-20 00:18:35 +08:00
|
|
|
#define KPROBE_THUMB16_BREAKPOINT_INSTRUCTION 0xde18
|
|
|
|
#define KPROBE_THUMB32_BREAKPOINT_INSTRUCTION 0xf7f0a018
|
|
|
|
|
2014-03-07 07:06:43 +08:00
|
|
|
struct decode_header;
|
|
|
|
union decode_action;
|
2011-04-20 17:52:38 +08:00
|
|
|
|
|
|
|
enum kprobe_insn {
|
|
|
|
INSN_REJECTED,
|
|
|
|
INSN_GOOD,
|
|
|
|
INSN_GOOD_NO_SLOT
|
|
|
|
};
|
|
|
|
|
2014-03-06 10:17:23 +08:00
|
|
|
typedef enum kprobe_insn (kprobe_decode_insn_t)(probes_opcode_t,
|
2014-03-07 07:06:43 +08:00
|
|
|
struct arch_specific_insn *,
|
|
|
|
const union decode_action *);
|
2011-04-20 00:56:58 +08:00
|
|
|
|
|
|
|
#ifdef CONFIG_THUMB2_KERNEL
|
|
|
|
|
2014-03-06 10:17:23 +08:00
|
|
|
enum kprobe_insn thumb16_kprobe_decode_insn(probes_opcode_t,
|
2014-03-07 07:06:43 +08:00
|
|
|
struct arch_specific_insn *,
|
|
|
|
const union decode_action *);
|
2014-03-06 10:17:23 +08:00
|
|
|
enum kprobe_insn thumb32_kprobe_decode_insn(probes_opcode_t,
|
2014-03-07 07:06:43 +08:00
|
|
|
struct arch_specific_insn *,
|
|
|
|
const union decode_action *);
|
2011-04-20 00:56:58 +08:00
|
|
|
|
|
|
|
#else /* !CONFIG_THUMB2_KERNEL */
|
|
|
|
|
2014-03-06 10:17:23 +08:00
|
|
|
enum kprobe_insn arm_kprobe_decode_insn(probes_opcode_t,
|
2014-03-07 07:06:43 +08:00
|
|
|
struct arch_specific_insn *,
|
|
|
|
const union decode_action *);
|
|
|
|
|
2011-04-20 00:56:58 +08:00
|
|
|
#endif
|
2011-04-20 17:52:38 +08:00
|
|
|
|
2014-03-08 00:16:10 +08:00
|
|
|
#include "probes.h"
|
2011-04-26 22:15:56 +08:00
|
|
|
|
2011-04-20 17:52:38 +08:00
|
|
|
#endif /* _ARM_KERNEL_KPROBES_H */
|