kprobes.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* MN10300 Kernel Probes support
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by Mark Salter (msalter@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public Licence as published by
  8. * the Free Software Foundation; either version 2 of the Licence, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public Licence for more details.
  15. *
  16. * You should have received a copy of the GNU General Public Licence
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19. *
  20. */
  21. #ifndef _ASM_KPROBES_H
  22. #define _ASM_KPROBES_H
  23. #include <linux/types.h>
  24. #include <linux/ptrace.h>
  25. struct kprobe;
  26. typedef unsigned char kprobe_opcode_t;
  27. #define BREAKPOINT_INSTRUCTION 0xff
  28. #define MAX_INSN_SIZE 8
  29. #define MAX_STACK_SIZE 128
  30. /* Architecture specific copy of original instruction */
  31. struct arch_specific_insn {
  32. /* copy of original instruction
  33. */
  34. kprobe_opcode_t insn[MAX_INSN_SIZE];
  35. };
  36. extern const int kretprobe_blacklist_size;
  37. extern int kprobe_exceptions_notify(struct notifier_block *self,
  38. unsigned long val, void *data);
  39. #define flush_insn_slot(p) do {} while (0)
  40. extern void arch_remove_kprobe(struct kprobe *p);
  41. #endif /* _ASM_KPROBES_H */