Linux 4.18.10
[linux/fpc-iii.git] / arch / arm64 / include / asm / kprobes.h
blob6deb8d726041eb9763efa84d4689ca24881d1e54
1 /*
2 * arch/arm64/include/asm/kprobes.h
4 * Copyright (C) 2013 Linaro Limited
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
16 #ifndef _ARM_KPROBES_H
17 #define _ARM_KPROBES_H
19 #include <asm-generic/kprobes.h>
21 #ifdef CONFIG_KPROBES
22 #include <linux/types.h>
23 #include <linux/ptrace.h>
24 #include <linux/percpu.h>
26 #define __ARCH_WANT_KPROBES_INSN_SLOT
27 #define MAX_INSN_SIZE 1
29 #define flush_insn_slot(p) do { } while (0)
30 #define kretprobe_blacklist_size 0
32 #include <asm/probes.h>
34 struct prev_kprobe {
35 struct kprobe *kp;
36 unsigned int status;
39 /* Single step context for kprobe */
40 struct kprobe_step_ctx {
41 unsigned long ss_pending;
42 unsigned long match_addr;
45 /* per-cpu kprobe control block */
46 struct kprobe_ctlblk {
47 unsigned int kprobe_status;
48 unsigned long saved_irqflag;
49 struct prev_kprobe prev_kprobe;
50 struct kprobe_step_ctx ss_ctx;
51 struct pt_regs jprobe_saved_regs;
54 void arch_remove_kprobe(struct kprobe *);
55 int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
56 int kprobe_exceptions_notify(struct notifier_block *self,
57 unsigned long val, void *data);
58 int kprobe_breakpoint_handler(struct pt_regs *regs, unsigned int esr);
59 int kprobe_single_step_handler(struct pt_regs *regs, unsigned int esr);
60 void kretprobe_trampoline(void);
61 void __kprobes *trampoline_probe_handler(struct pt_regs *regs);
63 #endif /* CONFIG_KPROBES */
64 #endif /* _ARM_KPROBES_H */