decode-insn.h 825 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * arch/arm64/kernel/probes/decode-insn.h
  4. *
  5. * Copyright (C) 2013 Linaro Limited.
  6. */
  7. #ifndef _ARM_KERNEL_KPROBES_ARM64_H
  8. #define _ARM_KERNEL_KPROBES_ARM64_H
  9. #include <asm/kprobes.h>
  10. /*
  11. * ARM strongly recommends a limit of 128 bytes between LoadExcl and
  12. * StoreExcl instructions in a single thread of execution. So keep the
  13. * max atomic context size as 32.
  14. */
  15. #define MAX_ATOMIC_CONTEXT_SIZE (128 / sizeof(kprobe_opcode_t))
  16. enum probe_insn {
  17. INSN_REJECTED,
  18. INSN_GOOD_NO_SLOT,
  19. INSN_GOOD,
  20. };
  21. #ifdef CONFIG_KPROBES
  22. enum probe_insn __kprobes
  23. arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi);
  24. #endif
  25. enum probe_insn __kprobes
  26. arm_probe_decode_insn(probe_opcode_t insn, struct arch_probe_insn *asi);
  27. #endif /* _ARM_KERNEL_KPROBES_ARM64_H */