probes-arm.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * arch/arm/kernel/probes-arm.h
  3. *
  4. * Copyright 2013 Linaro Ltd.
  5. * Written by: David A. Long
  6. *
  7. * The code contained herein is licensed under the GNU General Public
  8. * License. You may obtain a copy of the GNU General Public License
  9. * Version 2 or later at the following locations:
  10. *
  11. * http://www.opensource.org/licenses/gpl-license.html
  12. * http://www.gnu.org/copyleft/gpl.html
  13. */
  14. #ifndef _ARM_KERNEL_PROBES_ARM_H
  15. #define _ARM_KERNEL_PROBES_ARM_H
  16. enum probes_arm_action {
  17. PROBES_EMULATE_NONE,
  18. PROBES_SIMULATE_NOP,
  19. PROBES_PRELOAD_IMM,
  20. PROBES_PRELOAD_REG,
  21. PROBES_BRANCH_IMM,
  22. PROBES_BRANCH_REG,
  23. PROBES_MRS,
  24. PROBES_CLZ,
  25. PROBES_SATURATING_ARITHMETIC,
  26. PROBES_MUL1,
  27. PROBES_MUL2,
  28. PROBES_SWP,
  29. PROBES_LDRSTRD,
  30. PROBES_LOAD,
  31. PROBES_STORE,
  32. PROBES_LOAD_EXTRA,
  33. PROBES_STORE_EXTRA,
  34. PROBES_MOV_IP_SP,
  35. PROBES_DATA_PROCESSING_REG,
  36. PROBES_DATA_PROCESSING_IMM,
  37. PROBES_MOV_HALFWORD,
  38. PROBES_SEV,
  39. PROBES_WFE,
  40. PROBES_SATURATE,
  41. PROBES_REV,
  42. PROBES_MMI,
  43. PROBES_PACK,
  44. PROBES_EXTEND,
  45. PROBES_EXTEND_ADD,
  46. PROBES_MUL_ADD_LONG,
  47. PROBES_MUL_ADD,
  48. PROBES_BITFIELD,
  49. PROBES_BRANCH,
  50. PROBES_LDMSTM,
  51. NUM_PROBES_ARM_ACTIONS
  52. };
  53. void __kprobes simulate_bbl(probes_opcode_t opcode,
  54. struct arch_probes_insn *asi, struct pt_regs *regs);
  55. void __kprobes simulate_blx1(probes_opcode_t opcode,
  56. struct arch_probes_insn *asi, struct pt_regs *regs);
  57. void __kprobes simulate_blx2bx(probes_opcode_t opcode,
  58. struct arch_probes_insn *asi, struct pt_regs *regs);
  59. void __kprobes simulate_mrs(probes_opcode_t opcode,
  60. struct arch_probes_insn *asi, struct pt_regs *regs);
  61. void __kprobes simulate_mov_ipsp(probes_opcode_t opcode,
  62. struct arch_probes_insn *asi, struct pt_regs *regs);
  63. extern const union decode_item probes_decode_arm_table[];
  64. enum probes_insn arm_probes_decode_insn(probes_opcode_t,
  65. struct arch_probes_insn *, bool emulate,
  66. const union decode_action *actions);
  67. #endif