Merge tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / arm / probes / kprobes / core.h
blobc3db468650ce59f068048d74e0df41ae892db846
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * arch/arm/kernel/kprobes.h
5 * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>.
7 * Some contents moved here from arch/arm/include/asm/kprobes.h which is
8 * Copyright (C) 2006, 2007 Motorola Inc.
9 */
11 #ifndef _ARM_KERNEL_KPROBES_H
12 #define _ARM_KERNEL_KPROBES_H
14 #include <asm/kprobes.h>
15 #include "../decode.h"
18 * These undefined instructions must be unique and
19 * reserved solely for kprobes' use.
21 #define KPROBE_ARM_BREAKPOINT_INSTRUCTION 0x07f001f8
22 #define KPROBE_THUMB16_BREAKPOINT_INSTRUCTION 0xde18
23 #define KPROBE_THUMB32_BREAKPOINT_INSTRUCTION 0xf7f0a018
25 extern void kprobes_remove_breakpoint(void *addr, unsigned int insn);
27 enum probes_insn __kprobes
28 kprobe_decode_ldmstm(kprobe_opcode_t insn, struct arch_probes_insn *asi,
29 const struct decode_header *h);
31 typedef enum probes_insn (kprobe_decode_insn_t)(probes_opcode_t,
32 struct arch_probes_insn *,
33 bool,
34 const union decode_action *,
35 const struct decode_checker *[]);
37 #ifdef CONFIG_THUMB2_KERNEL
39 extern const union decode_action kprobes_t32_actions[];
40 extern const union decode_action kprobes_t16_actions[];
41 extern const struct decode_checker *kprobes_t32_checkers[];
42 extern const struct decode_checker *kprobes_t16_checkers[];
43 #else /* !CONFIG_THUMB2_KERNEL */
45 extern const union decode_action kprobes_arm_actions[];
46 extern const struct decode_checker *kprobes_arm_checkers[];
48 #endif
50 #endif /* _ARM_KERNEL_KPROBES_H */