diff options
Diffstat (limited to 'include/linux/kprobes.h')
| -rw-r--r-- | include/linux/kprobes.h | 53 |
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; | |||
| 63 | struct kretprobe; | 63 | struct kretprobe; |
| 64 | struct kretprobe_instance; | 64 | struct kretprobe_instance; |
| 65 | typedef int (*kprobe_pre_handler_t) (struct kprobe *, struct pt_regs *); | 65 | typedef int (*kprobe_pre_handler_t) (struct kprobe *, struct pt_regs *); |
| 66 | typedef int (*kprobe_break_handler_t) (struct kprobe *, struct pt_regs *); | ||
| 67 | typedef void (*kprobe_post_handler_t) (struct kprobe *, struct pt_regs *, | 66 | typedef void (*kprobe_post_handler_t) (struct kprobe *, struct pt_regs *, |
| 68 | unsigned long flags); | 67 | unsigned long flags); |
| 69 | typedef int (*kprobe_fault_handler_t) (struct kprobe *, struct pt_regs *, | 68 | typedef 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 | */ | ||
| 167 | struct 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); | |||
| 389 | void unregister_kprobe(struct kprobe *p); | 364 | void unregister_kprobe(struct kprobe *p); |
| 390 | int register_kprobes(struct kprobe **kps, int num); | 365 | int register_kprobes(struct kprobe **kps, int num); |
| 391 | void unregister_kprobes(struct kprobe **kps, int num); | 366 | void unregister_kprobes(struct kprobe **kps, int num); |
| 392 | int setjmp_pre_handler(struct kprobe *, struct pt_regs *); | ||
| 393 | int longjmp_break_handler(struct kprobe *, struct pt_regs *); | ||
| 394 | void jprobe_return(void); | ||
| 395 | unsigned long arch_deref_entry_point(void *); | 367 | unsigned long arch_deref_entry_point(void *); |
| 396 | 368 | ||
| 397 | int register_kretprobe(struct kretprobe *rp); | 369 | int register_kretprobe(struct kretprobe *rp); |
| @@ -439,9 +411,6 @@ static inline void unregister_kprobe(struct kprobe *p) | |||
| 439 | static inline void unregister_kprobes(struct kprobe **kps, int num) | 411 | static inline void unregister_kprobes(struct kprobe **kps, int num) |
| 440 | { | 412 | { |
| 441 | } | 413 | } |
| 442 | static inline void jprobe_return(void) | ||
| 443 | { | ||
| 444 | } | ||
| 445 | static inline int register_kretprobe(struct kretprobe *rp) | 414 | static 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 */ |
| 471 | static inline int register_jprobe(struct jprobe *p) | ||
| 472 | { | ||
| 473 | return -ENOSYS; | ||
| 474 | } | ||
| 475 | static inline int register_jprobes(struct jprobe **jps, int num) | ||
| 476 | { | ||
| 477 | return -ENOSYS; | ||
| 478 | } | ||
| 479 | static inline void unregister_jprobe(struct jprobe *p) | ||
| 480 | { | ||
| 481 | } | ||
| 482 | static inline void unregister_jprobes(struct jprobe **jps, int num) | ||
| 483 | { | ||
| 484 | } | ||
| 485 | static inline int disable_kretprobe(struct kretprobe *rp) | 440 | static 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 | } |
| 493 | static inline int disable_jprobe(struct jprobe *jp) | ||
| 494 | { | ||
| 495 | return -ENOSYS; | ||
| 496 | } | ||
| 497 | static inline int enable_jprobe(struct jprobe *jp) | ||
| 498 | { | ||
| 499 | return -ENOSYS; | ||
| 500 | } | ||
| 501 | 448 | ||
| 502 | #ifndef CONFIG_KPROBES | 449 | #ifndef CONFIG_KPROBES |
| 503 | static inline bool is_kprobe_insn_slot(unsigned long addr) | 450 | static inline bool is_kprobe_insn_slot(unsigned long addr) |
