uprobes.h 868 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2014-2016 Pratyush Anand <panand@redhat.com>
  4. */
  5. #ifndef _ASM_UPROBES_H
  6. #define _ASM_UPROBES_H
  7. #include <asm/debug-monitors.h>
  8. #include <asm/insn.h>
  9. #include <asm/probes.h>
  10. #define UPROBE_SWBP_INSN cpu_to_le32(BRK64_OPCODE_UPROBES)
  11. #define UPROBE_SWBP_INSN_SIZE AARCH64_INSN_SIZE
  12. #define UPROBE_XOL_SLOT_BYTES AARCH64_INSN_SIZE
  13. typedef __le32 uprobe_opcode_t;
  14. struct arch_uprobe_task {
  15. };
  16. struct arch_uprobe {
  17. union {
  18. __le32 insn;
  19. __le32 ixol;
  20. };
  21. struct arch_probe_insn api;
  22. bool simulate;
  23. };
  24. int uprobe_brk_handler(struct pt_regs *regs, unsigned long esr);
  25. #ifdef CONFIG_UPROBES
  26. int uprobe_single_step_handler(struct pt_regs *regs, unsigned long esr);
  27. #else
  28. static inline int uprobe_single_step_handler(struct pt_regs *regs,
  29. unsigned long esr)
  30. {
  31. return DBG_HOOK_ERROR;
  32. }
  33. #endif
  34. #endif