Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
kprobes.c File Reference
#include <linux/kprobes.h>
#include <linux/hash.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/stddef.h>
#include <linux/export.h>
#include <linux/moduleloader.h>
#include <linux/kallsyms.h>
#include <linux/freezer.h>
#include <linux/seq_file.h>
#include <linux/debugfs.h>
#include <linux/sysctl.h>
#include <linux/kdebug.h>
#include <linux/memory.h>
#include <linux/ftrace.h>
#include <linux/cpu.h>
#include <linux/jump_label.h>
#include <asm-generic/sections.h>
#include <asm/cacheflush.h>
#include <asm/errno.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Macros

#define KPROBE_HASH_BITS   6
 
#define KPROBE_TABLE_SIZE   (1 << KPROBE_HASH_BITS)
 
#define kprobe_lookup_name(name, addr)   addr = ((kprobe_opcode_t *)(kallsyms_lookup_name(name)))
 
#define optimize_kprobe(p)   do {} while (0)
 
#define unoptimize_kprobe(p, f)   do {} while (0)
 
#define kill_optimized_kprobe(p)   do {} while (0)
 
#define prepare_optimized_kprobe(p)   do {} while (0)
 
#define try_to_optimize_kprobe(p)   do {} while (0)
 
#define __arm_kprobe(p)   arch_arm_kprobe(p)
 
#define __disarm_kprobe(p, o)   arch_disarm_kprobe(p)
 
#define kprobe_disarmed(p)   kprobe_disabled(p)
 
#define wait_for_kprobe_optimizer()   do {} while (0)
 
#define prepare_kprobe(p)   arch_prepare_kprobe(p)
 
#define arm_kprobe_ftrace(p)   do {} while (0)
 
#define disarm_kprobe_ftrace(p)   do {} while (0)
 

Functions

struct kprobe __kprobesget_kprobe (void *addr)
 
void __kprobes kprobes_inc_nmissed_count (struct kprobe *p)
 
void __kprobes recycle_rp_inst (struct kretprobe_instance *ri, struct hlist_head *head)
 
void __kprobes kretprobe_hash_lock (struct task_struct *tsk, struct hlist_head **head, unsigned long *flags) __acquires(hlist_lock)
 
void __kprobes kretprobe_hash_unlock (struct task_struct *tsk, unsigned long *flags) __releases(hlist_lock)
 
void __kprobes kprobe_flush_task (struct task_struct *tk)
 
int __kprobes register_kprobe (struct kprobe *p)
 
 EXPORT_SYMBOL_GPL (register_kprobe)
 
int __kprobes register_kprobes (struct kprobe **kps, int num)
 
 EXPORT_SYMBOL_GPL (register_kprobes)
 
void __kprobes unregister_kprobe (struct kprobe *p)
 
 EXPORT_SYMBOL_GPL (unregister_kprobe)
 
void __kprobes unregister_kprobes (struct kprobe **kps, int num)
 
 EXPORT_SYMBOL_GPL (unregister_kprobes)
 
unsigned long __weak arch_deref_entry_point (void *entry)
 
int __kprobes register_jprobes (struct jprobe **jps, int num)
 
 EXPORT_SYMBOL_GPL (register_jprobes)
 
int __kprobes register_jprobe (struct jprobe *jp)
 
 EXPORT_SYMBOL_GPL (register_jprobe)
 
void __kprobes unregister_jprobe (struct jprobe *jp)
 
 EXPORT_SYMBOL_GPL (unregister_jprobe)
 
void __kprobes unregister_jprobes (struct jprobe **jps, int num)
 
 EXPORT_SYMBOL_GPL (unregister_jprobes)
 
int __kprobes register_kretprobe (struct kretprobe *rp)
 
 EXPORT_SYMBOL_GPL (register_kretprobe)
 
int __kprobes register_kretprobes (struct kretprobe **rps, int num)
 
 EXPORT_SYMBOL_GPL (register_kretprobes)
 
void __kprobes unregister_kretprobe (struct kretprobe *rp)
 
 EXPORT_SYMBOL_GPL (unregister_kretprobe)
 
void __kprobes unregister_kretprobes (struct kretprobe **rps, int num)
 
 EXPORT_SYMBOL_GPL (unregister_kretprobes)
 
int __kprobes disable_kprobe (struct kprobe *kp)
 
 EXPORT_SYMBOL_GPL (disable_kprobe)
 
int __kprobes enable_kprobe (struct kprobe *kp)
 
 EXPORT_SYMBOL_GPL (enable_kprobe)
 
void __kprobes dump_kprobe (struct kprobe *kp)
 
 module_init (init_kprobes)
 
 EXPORT_SYMBOL_GPL (jprobe_return)
 

Macro Definition Documentation

#define __arm_kprobe (   p)    arch_arm_kprobe(p)

Definition at line 898 of file kprobes.c.

#define __disarm_kprobe (   p,
 
)    arch_disarm_kprobe(p)

Definition at line 899 of file kprobes.c.

#define arm_kprobe_ftrace (   p)    do {} while (0)

Definition at line 969 of file kprobes.c.

#define disarm_kprobe_ftrace (   p)    do {} while (0)

Definition at line 970 of file kprobes.c.

#define kill_optimized_kprobe (   p)    do {} while (0)

Definition at line 895 of file kprobes.c.

#define kprobe_disarmed (   p)    kprobe_disabled(p)

Definition at line 900 of file kprobes.c.

#define KPROBE_HASH_BITS   6

Definition at line 57 of file kprobes.c.

#define kprobe_lookup_name (   name,
  addr 
)    addr = ((kprobe_opcode_t *)(kallsyms_lookup_name(name)))

Definition at line 66 of file kprobes.c.

#define KPROBE_TABLE_SIZE   (1 << KPROBE_HASH_BITS)

Definition at line 58 of file kprobes.c.

#define optimize_kprobe (   p)    do {} while (0)

Definition at line 893 of file kprobes.c.

#define prepare_kprobe (   p)    arch_prepare_kprobe(p)

Definition at line 968 of file kprobes.c.

#define prepare_optimized_kprobe (   p)    do {} while (0)

Definition at line 896 of file kprobes.c.

#define try_to_optimize_kprobe (   p)    do {} while (0)

Definition at line 897 of file kprobes.c.

#define unoptimize_kprobe (   p,
  f 
)    do {} while (0)

Definition at line 894 of file kprobes.c.

#define wait_for_kprobe_optimizer ( )    do {} while (0)

Definition at line 901 of file kprobes.c.

Function Documentation

unsigned long __weak arch_deref_entry_point ( void entry)

Definition at line 1694 of file kprobes.c.

int __kprobes disable_kprobe ( struct kprobe kp)

Definition at line 1962 of file kprobes.c.

void __kprobes dump_kprobe ( struct kprobe kp)

Definition at line 2011 of file kprobes.c.

int __kprobes enable_kprobe ( struct kprobe kp)

Definition at line 1978 of file kprobes.c.

EXPORT_SYMBOL_GPL ( register_kprobe  )
EXPORT_SYMBOL_GPL ( register_kprobes  )
EXPORT_SYMBOL_GPL ( unregister_kprobe  )
EXPORT_SYMBOL_GPL ( unregister_kprobes  )
EXPORT_SYMBOL_GPL ( register_jprobes  )
EXPORT_SYMBOL_GPL ( register_jprobe  )
EXPORT_SYMBOL_GPL ( unregister_jprobe  )
EXPORT_SYMBOL_GPL ( unregister_jprobes  )
EXPORT_SYMBOL_GPL ( register_kretprobe  )
EXPORT_SYMBOL_GPL ( register_kretprobes  )
EXPORT_SYMBOL_GPL ( unregister_kretprobe  )
EXPORT_SYMBOL_GPL ( unregister_kretprobes  )
EXPORT_SYMBOL_GPL ( disable_kprobe  )
EXPORT_SYMBOL_GPL ( enable_kprobe  )
EXPORT_SYMBOL_GPL ( jprobe_return  )
struct kprobe __kprobes* get_kprobe ( void addr)
read

Definition at line 334 of file kprobes.c.

void __kprobes kprobe_flush_task ( struct task_struct tk)

Definition at line 1140 of file kprobes.c.

void __kprobes kprobes_inc_nmissed_count ( struct kprobe p)

Definition at line 1066 of file kprobes.c.

void __kprobes kretprobe_hash_lock ( struct task_struct tsk,
struct hlist_head **  head,
unsigned long flags 
)

Definition at line 1095 of file kprobes.c.

void __kprobes kretprobe_hash_unlock ( struct task_struct tsk,
unsigned long flags 
)

Definition at line 1115 of file kprobes.c.

module_init ( init_kprobes  )
void __kprobes recycle_rp_inst ( struct kretprobe_instance ri,
struct hlist_head head 
)

Definition at line 1078 of file kprobes.c.

int __kprobes register_jprobe ( struct jprobe jp)

Definition at line 1730 of file kprobes.c.

int __kprobes register_jprobes ( struct jprobe **  jps,
int  num 
)

Definition at line 1699 of file kprobes.c.

int __kprobes register_kprobe ( struct kprobe p)

Definition at line 1468 of file kprobes.c.

int __kprobes register_kprobes ( struct kprobe **  kps,
int  num 
)

Definition at line 1646 of file kprobes.c.

int __kprobes register_kretprobe ( struct kretprobe rp)

Definition at line 1907 of file kprobes.c.

int __kprobes register_kretprobes ( struct kretprobe **  rps,
int  num 
)

Definition at line 1913 of file kprobes.c.

void __kprobes unregister_jprobe ( struct jprobe jp)

Definition at line 1736 of file kprobes.c.

void __kprobes unregister_jprobes ( struct jprobe **  jps,
int  num 
)

Definition at line 1742 of file kprobes.c.

void __kprobes unregister_kprobe ( struct kprobe p)

Definition at line 1664 of file kprobes.c.

void __kprobes unregister_kprobes ( struct kprobe **  kps,
int  num 
)

Definition at line 1670 of file kprobes.c.

void __kprobes unregister_kretprobe ( struct kretprobe rp)

Definition at line 1919 of file kprobes.c.

void __kprobes unregister_kretprobes ( struct kretprobe **  rps,
int  num 
)

Definition at line 1924 of file kprobes.c.

Variable Documentation

raw_spinlock_t lock ____cacheline_aligned_in_smp

Definition at line 81 of file kprobes.c.