Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * arch/arm/kernel/kprobes.h
0004  *
0005  * Copyright (C) 2011 Jon Medhurst <tixy@yxit.co.uk>.
0006  *
0007  * Some contents moved here from arch/arm/include/asm/kprobes.h which is
0008  * Copyright (C) 2006, 2007 Motorola Inc.
0009  */
0010 
0011 #ifndef _ARM_KERNEL_KPROBES_H
0012 #define _ARM_KERNEL_KPROBES_H
0013 
0014 #include <asm/kprobes.h>
0015 #include "../decode.h"
0016 
0017 /*
0018  * These undefined instructions must be unique and
0019  * reserved solely for kprobes' use.
0020  */
0021 #define KPROBE_ARM_BREAKPOINT_INSTRUCTION   0x07f001f8
0022 #define KPROBE_THUMB16_BREAKPOINT_INSTRUCTION   0xde18
0023 #define KPROBE_THUMB32_BREAKPOINT_INSTRUCTION   0xf7f0a018
0024 
0025 extern void kprobes_remove_breakpoint(void *addr, unsigned int insn);
0026 
0027 enum probes_insn __kprobes
0028 kprobe_decode_ldmstm(kprobe_opcode_t insn, struct arch_probes_insn *asi,
0029         const struct decode_header *h);
0030 
0031 typedef enum probes_insn (kprobe_decode_insn_t)(probes_opcode_t,
0032                         struct arch_probes_insn *,
0033                         bool,
0034                         const union decode_action *,
0035                         const struct decode_checker *[]);
0036 
0037 #ifdef CONFIG_THUMB2_KERNEL
0038 
0039 extern const union decode_action kprobes_t32_actions[];
0040 extern const union decode_action kprobes_t16_actions[];
0041 extern const struct decode_checker *kprobes_t32_checkers[];
0042 extern const struct decode_checker *kprobes_t16_checkers[];
0043 #else /* !CONFIG_THUMB2_KERNEL */
0044 
0045 extern const union decode_action kprobes_arm_actions[];
0046 extern const struct decode_checker *kprobes_arm_checkers[];
0047 
0048 #endif
0049 
0050 #endif /* _ARM_KERNEL_KPROBES_H */