checkers.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * arch/arm/probes/kprobes/checkers.h
  3. *
  4. * Copyright (C) 2014 Huawei Inc.
  5. *
  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.
  9. *
  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.
  14. */
  15. #ifndef _ARM_KERNEL_PROBES_CHECKERS_H
  16. #define _ARM_KERNEL_PROBES_CHECKERS_H
  17. #include <linux/kernel.h>
  18. #include <linux/types.h>
  19. #include "../decode.h"
  20. extern probes_check_t checker_stack_use_none;
  21. extern probes_check_t checker_stack_use_unknown;
  22. #ifdef CONFIG_THUMB2_KERNEL
  23. extern probes_check_t checker_stack_use_imm_0xx;
  24. #else
  25. extern probes_check_t checker_stack_use_imm_x0x;
  26. #endif
  27. extern probes_check_t checker_stack_use_imm_xxx;
  28. extern probes_check_t checker_stack_use_stmdx;
  29. enum {
  30. STACK_USE_NONE,
  31. STACK_USE_UNKNOWN,
  32. #ifdef CONFIG_THUMB2_KERNEL
  33. STACK_USE_FIXED_0XX,
  34. STACK_USE_T32STRD,
  35. #else
  36. STACK_USE_FIXED_X0X,
  37. #endif
  38. STACK_USE_FIXED_XXX,
  39. STACK_USE_STMDX,
  40. NUM_STACK_USE_TYPES
  41. };
  42. extern const union decode_action stack_check_actions[];
  43. #ifndef CONFIG_THUMB2_KERNEL
  44. extern const struct decode_checker arm_stack_checker[];
  45. extern const struct decode_checker arm_regs_checker[];
  46. #else
  47. #endif
  48. extern const struct decode_checker t32_stack_checker[];
  49. extern const struct decode_checker t16_stack_checker[];
  50. #endif