Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
uprobes.c File Reference
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/ptrace.h>
#include <linux/uprobes.h>
#include <linux/uaccess.h>
#include <linux/kdebug.h>
#include <asm/processor.h>
#include <asm/insn.h>

Go to the source code of this file.

Macros

#define UPROBE_FIX_NONE   0x0
 
#define UPROBE_FIX_IP   0x1
 
#define UPROBE_FIX_CALL   0x2
 
#define UPROBE_FIX_SETF   0x4
 
#define UPROBE_FIX_RIP_AX   0x8000
 
#define UPROBE_FIX_RIP_CX   0x4000
 
#define UPROBE_TRAP_NR   UINT_MAX
 
#define OPCODE1(insn)   ((insn)->opcode.bytes[0])
 
#define OPCODE2(insn)   ((insn)->opcode.bytes[1])
 
#define OPCODE3(insn)   ((insn)->opcode.bytes[2])
 
#define MODRM_REG(insn)   X86_MODRM_REG(insn->modrm.value)
 
#define W(row, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf)
 

Functions

int arch_uprobe_analyze_insn (struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long addr)
 
int arch_uprobe_pre_xol (struct arch_uprobe *auprobe, struct pt_regs *regs)
 
bool arch_uprobe_xol_was_trapped (struct task_struct *t)
 
int arch_uprobe_post_xol (struct arch_uprobe *auprobe, struct pt_regs *regs)
 
int arch_uprobe_exception_notify (struct notifier_block *self, unsigned long val, void *data)
 
void arch_uprobe_abort_xol (struct arch_uprobe *auprobe, struct pt_regs *regs)
 
bool arch_uprobe_skip_sstep (struct arch_uprobe *auprobe, struct pt_regs *regs)
 
void arch_uprobe_enable_step (struct arch_uprobe *auprobe)
 
void arch_uprobe_disable_step (struct arch_uprobe *auprobe)
 

Macro Definition Documentation

#define MODRM_REG (   insn)    X86_MODRM_REG(insn->modrm.value)

Definition at line 56 of file uprobes.c.

#define OPCODE1 (   insn)    ((insn)->opcode.bytes[0])

Definition at line 53 of file uprobes.c.

#define OPCODE2 (   insn)    ((insn)->opcode.bytes[1])

Definition at line 54 of file uprobes.c.

#define OPCODE3 (   insn)    ((insn)->opcode.bytes[2])

Definition at line 55 of file uprobes.c.

#define UPROBE_FIX_CALL   0x2

Definition at line 42 of file uprobes.c.

#define UPROBE_FIX_IP   0x1

Definition at line 39 of file uprobes.c.

#define UPROBE_FIX_NONE   0x0

Definition at line 36 of file uprobes.c.

#define UPROBE_FIX_RIP_AX   0x8000

Definition at line 47 of file uprobes.c.

#define UPROBE_FIX_RIP_CX   0x4000

Definition at line 48 of file uprobes.c.

#define UPROBE_FIX_SETF   0x4

Definition at line 45 of file uprobes.c.

#define UPROBE_TRAP_NR   UINT_MAX

Definition at line 50 of file uprobes.c.

#define W (   row,
  b0,
  b1,
  b2,
  b3,
  b4,
  b5,
  b6,
  b7,
  b8,
  b9,
  ba,
  bb,
  bc,
  bd,
  be,
  bf 
)
Value:
(((b0##UL << 0x0)|(b1##UL << 0x1)|(b2##UL << 0x2)|(b3##UL << 0x3) | \
(b4##UL << 0x4)|(b5##UL << 0x5)|(b6##UL << 0x6)|(b7##UL << 0x7) | \
(b8##UL << 0x8)|(b9##UL << 0x9)|(ba##UL << 0xa)|(bb##UL << 0xb) | \
(bc##UL << 0xc)|(bd##UL << 0xd)|(be##UL << 0xe)|(bf##UL << 0xf)) \
<< (row % 32))

Definition at line 58 of file uprobes.c.

Function Documentation

void arch_uprobe_abort_xol ( struct arch_uprobe auprobe,
struct pt_regs regs 
)

Definition at line 643 of file uprobes.c.

int arch_uprobe_analyze_insn ( struct arch_uprobe auprobe,
struct mm_struct mm,
unsigned long  addr 
)

arch_uprobe_analyze_insn - instruction analysis including validity and fixups. : the probed address space. : the probepoint information. : virtual address at which to install the probepoint Return 0 on success or a -ve number on error.

Definition at line 422 of file uprobes.c.

void arch_uprobe_disable_step ( struct arch_uprobe auprobe)

Definition at line 693 of file uprobes.c.

void arch_uprobe_enable_step ( struct arch_uprobe auprobe)

Definition at line 680 of file uprobes.c.

int arch_uprobe_exception_notify ( struct notifier_block self,
unsigned long  val,
void data 
)

Definition at line 610 of file uprobes.c.

int arch_uprobe_post_xol ( struct arch_uprobe auprobe,
struct pt_regs regs 
)

Definition at line 588 of file uprobes.c.

int arch_uprobe_pre_xol ( struct arch_uprobe auprobe,
struct pt_regs regs 
)

Definition at line 471 of file uprobes.c.

bool arch_uprobe_skip_sstep ( struct arch_uprobe auprobe,
struct pt_regs regs 
)

Definition at line 672 of file uprobes.c.

bool arch_uprobe_xol_was_trapped ( struct task_struct t)

Definition at line 556 of file uprobes.c.