Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
kprobes.c File Reference
#include <linux/kprobes.h>
#include <linux/ptrace.h>
#include <linux/spinlock.h>
#include <linux/preempt.h>
#include <linux/kdebug.h>
#include <asm/cacheflush.h>

Go to the source code of this file.

Macros

#define KPROBE_HIT_ACTIVE   0x00000001
 
#define KPROBE_HIT_SS   0x00000002
 
#define SINGLESTEP_BRANCH   1
 
#define SINGLESTEP_PCREL   2
 
#define READ_BYTE(p, valp)   do { *(u8 *)(valp) = *(u8 *)(p); } while (0)
 
#define READ_WORD16(p, valp)
 
#define READ_WORD32(p, valp)
 
#define LT   (1 << 0)
 
#define GT   (1 << 1)
 
#define GE   (1 << 2)
 
#define LE   (1 << 3)
 
#define CS   (1 << 4)
 
#define HI   (1 << 5)
 
#define CC   (1 << 6)
 
#define LS   (1 << 7)
 
#define EQ   (1 << 8)
 
#define NE   (1 << 9)
 
#define RA   (1 << 10)
 
#define VC   (1 << 11)
 
#define VS   (1 << 12)
 
#define NC   (1 << 13)
 
#define NS   (1 << 14)
 

Functions

 DEFINE_PER_CPU (struct kprobe *, current_kprobe)
 
int __kprobes arch_prepare_kprobe (struct kprobe *p)
 
void __kprobes arch_copy_kprobe (struct kprobe *p)
 
void __kprobes arch_arm_kprobe (struct kprobe *p)
 
void __kprobes arch_disarm_kprobe (struct kprobe *p)
 
void arch_remove_kprobe (struct kprobe *p)
 
int __kprobes kprobe_exceptions_notify (struct notifier_block *self, unsigned long val, void *data)
 
int __kprobes setjmp_pre_handler (struct kprobe *p, struct pt_regs *regs)
 
void __kprobes jprobe_return (void)
 
void jprobe_return_bp_addr (void)
 
int __kprobes longjmp_break_handler (struct kprobe *p, struct pt_regs *regs)
 
int __init arch_init_kprobes (void)
 

Variables

struct kretprobe_blackpoint kretprobe_blacklist [] = { { NULL, NULL } }
 
const int kretprobe_blacklist_size = ARRAY_SIZE(kretprobe_blacklist)
 

Macro Definition Documentation

#define CC   (1 << 6)

Definition at line 94 of file kprobes.c.

#define CS   (1 << 4)

Definition at line 92 of file kprobes.c.

#define EQ   (1 << 8)

Definition at line 96 of file kprobes.c.

#define GE   (1 << 2)

Definition at line 90 of file kprobes.c.

#define GT   (1 << 1)

Definition at line 89 of file kprobes.c.

#define HI   (1 << 5)

Definition at line 93 of file kprobes.c.

#define KPROBE_HIT_ACTIVE   0x00000001

Definition at line 31 of file kprobes.c.

#define KPROBE_HIT_SS   0x00000002

Definition at line 32 of file kprobes.c.

#define LE   (1 << 3)

Definition at line 91 of file kprobes.c.

#define LS   (1 << 7)

Definition at line 95 of file kprobes.c.

#define LT   (1 << 0)

Definition at line 88 of file kprobes.c.

#define NC   (1 << 13)

Definition at line 101 of file kprobes.c.

#define NE   (1 << 9)

Definition at line 97 of file kprobes.c.

#define NS   (1 << 14)

Definition at line 102 of file kprobes.c.

#define RA   (1 << 10)

Definition at line 98 of file kprobes.c.

#define READ_BYTE (   p,
  valp 
)    do { *(u8 *)(valp) = *(u8 *)(p); } while (0)

Definition at line 49 of file kprobes.c.

#define READ_WORD16 (   p,
  valp 
)
Value:
do { \
READ_BYTE((p), (valp)); \
READ_BYTE((u8 *)(p) + 1, (u8 *)(valp) + 1); \
} while (0)

Definition at line 52 of file kprobes.c.

#define READ_WORD32 (   p,
  valp 
)
Value:
do { \
READ_BYTE((p), (valp)); \
READ_BYTE((u8 *)(p) + 1, (u8 *)(valp) + 1); \
READ_BYTE((u8 *)(p) + 2, (u8 *)(valp) + 2); \
READ_BYTE((u8 *)(p) + 3, (u8 *)(valp) + 3); \
} while (0)

Definition at line 58 of file kprobes.c.

#define SINGLESTEP_BRANCH   1

Definition at line 46 of file kprobes.c.

#define SINGLESTEP_PCREL   2

Definition at line 47 of file kprobes.c.

#define VC   (1 << 11)

Definition at line 99 of file kprobes.c.

#define VS   (1 << 12)

Definition at line 100 of file kprobes.c.

Function Documentation

void __kprobes arch_arm_kprobe ( struct kprobe p)

Definition at line 371 of file kprobes.c.

void __kprobes arch_copy_kprobe ( struct kprobe p)

Definition at line 366 of file kprobes.c.

void __kprobes arch_disarm_kprobe ( struct kprobe p)

Definition at line 378 of file kprobes.c.

int __init arch_init_kprobes ( void  )

Definition at line 653 of file kprobes.c.

int __kprobes arch_prepare_kprobe ( struct kprobe p)

Definition at line 361 of file kprobes.c.

void arch_remove_kprobe ( struct kprobe p)

Definition at line 386 of file kprobes.c.

DEFINE_PER_CPU ( struct kprobe ,
current_kprobe   
)
void __kprobes jprobe_return ( void  )

Definition at line 615 of file kprobes.c.

void jprobe_return_bp_addr ( void  )
int __kprobes kprobe_exceptions_notify ( struct notifier_block self,
unsigned long  val,
void data 
)

Definition at line 566 of file kprobes.c.

int __kprobes longjmp_break_handler ( struct kprobe p,
struct pt_regs regs 
)

Definition at line 629 of file kprobes.c.

int __kprobes setjmp_pre_handler ( struct kprobe p,
struct pt_regs regs 
)

Definition at line 597 of file kprobes.c.

Variable Documentation

struct kretprobe_blackpoint kretprobe_blacklist[] = { { NULL, NULL } }

Definition at line 27 of file kprobes.c.

const int kretprobe_blacklist_size = ARRAY_SIZE(kretprobe_blacklist)

Definition at line 28 of file kprobes.c.