kmemcheck.h 847 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef ASM_X86_KMEMCHECK_H
  2. #define ASM_X86_KMEMCHECK_H
  3. #include <linux/types.h>
  4. #include <asm/ptrace.h>
  5. #ifdef CONFIG_KMEMCHECK
  6. bool kmemcheck_active(struct pt_regs *regs);
  7. void kmemcheck_show(struct pt_regs *regs);
  8. void kmemcheck_hide(struct pt_regs *regs);
  9. bool kmemcheck_fault(struct pt_regs *regs,
  10. unsigned long address, unsigned long error_code);
  11. bool kmemcheck_trap(struct pt_regs *regs);
  12. #else
  13. static inline bool kmemcheck_active(struct pt_regs *regs)
  14. {
  15. return false;
  16. }
  17. static inline void kmemcheck_show(struct pt_regs *regs)
  18. {
  19. }
  20. static inline void kmemcheck_hide(struct pt_regs *regs)
  21. {
  22. }
  23. static inline bool kmemcheck_fault(struct pt_regs *regs,
  24. unsigned long address, unsigned long error_code)
  25. {
  26. return false;
  27. }
  28. static inline bool kmemcheck_trap(struct pt_regs *regs)
  29. {
  30. return false;
  31. }
  32. #endif /* CONFIG_KMEMCHECK */
  33. #endif