aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kprobes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kprobes.h')
-rw-r--r--include/linux/kprobes.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 9440a2fc8893..e909413e4e38 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -63,7 +63,6 @@ struct pt_regs;
63struct kretprobe; 63struct kretprobe;
64struct kretprobe_instance; 64struct kretprobe_instance;
65typedef int (*kprobe_pre_handler_t) (struct kprobe *, struct pt_regs *); 65typedef int (*kprobe_pre_handler_t) (struct kprobe *, struct pt_regs *);
66typedef int (*kprobe_break_handler_t) (struct kprobe *, struct pt_regs *);
67typedef void (*kprobe_post_handler_t) (struct kprobe *, struct pt_regs *, 66typedef void (*kprobe_post_handler_t) (struct kprobe *, struct pt_regs *,
68 unsigned long flags); 67 unsigned long flags);
69typedef int (*kprobe_fault_handler_t) (struct kprobe *, struct pt_regs *, 68typedef int (*kprobe_fault_handler_t) (struct kprobe *, struct pt_regs *,
@@ -101,12 +100,6 @@ struct kprobe {
101 */ 100 */
102 kprobe_fault_handler_t fault_handler; 101 kprobe_fault_handler_t fault_handler;
103 102
104 /*
105 * ... called if breakpoint trap occurs in probe handler.
106 * Return 1 if it handled break, otherwise kernel will see it.
107 */
108 kprobe_break_handler_t break_handler;
109
110 /* Saved opcode (which has been replaced with breakpoint) */ 103 /* Saved opcode (which has been replaced with breakpoint) */
111 kprobe_opcode_t opcode; 104 kprobe_opcode_t opcode;
112 105
@@ -155,24 +148,6 @@ static inline int kprobe_ftrace(struct kprobe *p)
155} 148}
156 149
157/* 150/*
158 * Special probe type that uses setjmp-longjmp type tricks to resume
159 * execution at a specified entry with a matching prototype corresponding
160 * to the probed function - a trick to enable arguments to become
161 * accessible seamlessly by probe handling logic.
162 * Note:
163 * Because of the way compilers allocate stack space for local variables
164 * etc upfront, regardless of sub-scopes within a function, this mirroring
165 * principle currently works only for probes placed on function entry points.
166 */
167struct jprobe {
168 struct kprobe kp;
169 void *entry; /* probe handling code to jump to */
170};
171
172/* For backward compatibility with old code using JPROBE_ENTRY() */
173#define JPROBE_ENTRY(handler) (handler)
174
175/*
176 * Function-return probe - 151 * Function-return probe -
177 * Note: 152 * Note:
178 * User needs to provide a handler function, and initialize maxactive. 153 * User needs to provide a handler function, and initialize maxactive.
@@ -389,9 +364,6 @@ int register_kprobe(struct kprobe *p);
389void unregister_kprobe(struct kprobe *p); 364void unregister_kprobe(struct kprobe *p);
390int register_kprobes(struct kprobe **kps, int num); 365int register_kprobes(struct kprobe **kps, int num);
391void unregister_kprobes(struct kprobe **kps, int num); 366void unregister_kprobes(struct kprobe **kps, int num);
392int setjmp_pre_handler(struct kprobe *, struct pt_regs *);
393int longjmp_break_handler(struct kprobe *, struct pt_regs *);
394void jprobe_return(void);
395unsigned long arch_deref_entry_point(void *); 367unsigned long arch_deref_entry_point(void *);
396 368
397int register_kretprobe(struct kretprobe *rp); 369int register_kretprobe(struct kretprobe *rp);
@@ -439,9 +411,6 @@ static inline void unregister_kprobe(struct kprobe *p)
439static inline void unregister_kprobes(struct kprobe **kps, int num) 411static inline void unregister_kprobes(struct kprobe **kps, int num)
440{ 412{
441} 413}
442static inline void jprobe_return(void)
443{
444}
445static inline int register_kretprobe(struct kretprobe *rp) 414static inline int register_kretprobe(struct kretprobe *rp)
446{ 415{
447 return -ENOSYS; 416 return -ENOSYS;
@@ -468,20 +437,6 @@ static inline int enable_kprobe(struct kprobe *kp)
468 return -ENOSYS; 437 return -ENOSYS;
469} 438}
470#endif /* CONFIG_KPROBES */ 439#endif /* CONFIG_KPROBES */
471static inline int register_jprobe(struct jprobe *p)
472{
473 return -ENOSYS;
474}
475static inline int register_jprobes(struct jprobe **jps, int num)
476{
477 return -ENOSYS;
478}
479static inline void unregister_jprobe(struct jprobe *p)
480{
481}
482static inline void unregister_jprobes(struct jprobe **jps, int num)
483{
484}
485static inline int disable_kretprobe(struct kretprobe *rp) 440static inline int disable_kretprobe(struct kretprobe *rp)
486{ 441{
487 return disable_kprobe(&rp->kp); 442 return disable_kprobe(&rp->kp);
@@ -490,14 +445,6 @@ static inline int enable_kretprobe(struct kretprobe *rp)
490{ 445{
491 return enable_kprobe(&rp->kp); 446 return enable_kprobe(&rp->kp);
492} 447}
493static inline int disable_jprobe(struct jprobe *jp)
494{
495 return -ENOSYS;
496}
497static inline int enable_jprobe(struct jprobe *jp)
498{
499 return -ENOSYS;
500}
501 448
502#ifndef CONFIG_KPROBES 449#ifndef CONFIG_KPROBES
503static inline bool is_kprobe_insn_slot(unsigned long addr) 450static inline bool is_kprobe_insn_slot(unsigned long addr)