~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/sh/include/asm/kprobes.h

Version: ~ [ linux-5.4-rc3 ] ~ [ linux-5.3.6 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.79 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.149 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.196 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.196 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.75 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __ASM_SH_KPROBES_H
  2 #define __ASM_SH_KPROBES_H
  3 
  4 #include <asm-generic/kprobes.h>
  5 
  6 #define BREAKPOINT_INSTRUCTION  0xc33a
  7 
  8 #ifdef CONFIG_KPROBES
  9 
 10 #include <linux/types.h>
 11 #include <linux/ptrace.h>
 12 
 13 typedef insn_size_t kprobe_opcode_t;
 14 
 15 #define MAX_INSN_SIZE 16
 16 #define MAX_STACK_SIZE 64
 17 #define MIN_STACK_SIZE(ADDR) (((MAX_STACK_SIZE) < \
 18         (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) \
 19         ? (MAX_STACK_SIZE) \
 20         : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
 21 
 22 #define flush_insn_slot(p)              do { } while (0)
 23 #define kretprobe_blacklist_size        0
 24 
 25 struct kprobe;
 26 
 27 void arch_remove_kprobe(struct kprobe *);
 28 void kretprobe_trampoline(void);
 29 void jprobe_return_end(void);
 30 
 31 /* Architecture specific copy of original instruction*/
 32 struct arch_specific_insn {
 33         /* copy of the original instruction */
 34         kprobe_opcode_t insn[MAX_INSN_SIZE];
 35 };
 36 
 37 struct prev_kprobe {
 38         struct kprobe *kp;
 39         unsigned long status;
 40 };
 41 
 42 /* per-cpu kprobe control block */
 43 struct kprobe_ctlblk {
 44         unsigned long kprobe_status;
 45         unsigned long jprobe_saved_r15;
 46         struct pt_regs jprobe_saved_regs;
 47         kprobe_opcode_t jprobes_stack[MAX_STACK_SIZE];
 48         struct prev_kprobe prev_kprobe;
 49 };
 50 
 51 extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
 52 extern int kprobe_exceptions_notify(struct notifier_block *self,
 53                                     unsigned long val, void *data);
 54 extern int kprobe_handle_illslot(unsigned long pc);
 55 #else
 56 
 57 #define kprobe_handle_illslot(pc)       (-1)
 58 
 59 #endif /* CONFIG_KPROBES */
 60 #endif /* __ASM_SH_KPROBES_H */
 61 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp