kprobes.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. #ifndef __ASM_CSKY_KPROBES_H
  3. #define __ASM_CSKY_KPROBES_H
  4. #include <asm-generic/kprobes.h>
  5. #ifdef CONFIG_KPROBES
  6. #include <linux/types.h>
  7. #include <linux/ptrace.h>
  8. #include <linux/percpu.h>
  9. #define __ARCH_WANT_KPROBES_INSN_SLOT
  10. #define MAX_INSN_SIZE 1
  11. #define flush_insn_slot(p) do { } while (0)
  12. #define kretprobe_blacklist_size 0
  13. #include <asm/probes.h>
  14. struct prev_kprobe {
  15. struct kprobe *kp;
  16. unsigned int status;
  17. };
  18. /* Single step context for kprobe */
  19. struct kprobe_step_ctx {
  20. unsigned long ss_pending;
  21. unsigned long match_addr;
  22. };
  23. /* per-cpu kprobe control block */
  24. struct kprobe_ctlblk {
  25. unsigned int kprobe_status;
  26. unsigned long saved_sr;
  27. struct prev_kprobe prev_kprobe;
  28. struct kprobe_step_ctx ss_ctx;
  29. };
  30. void arch_remove_kprobe(struct kprobe *p);
  31. int kprobe_fault_handler(struct pt_regs *regs, unsigned int trapnr);
  32. int kprobe_breakpoint_handler(struct pt_regs *regs);
  33. int kprobe_single_step_handler(struct pt_regs *regs);
  34. void __kretprobe_trampoline(void);
  35. void __kprobes *trampoline_probe_handler(struct pt_regs *regs);
  36. #endif /* CONFIG_KPROBES */
  37. #endif /* __ASM_CSKY_KPROBES_H */