Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
kprobes.h File Reference

Go to the source code of this file.

Data Structures

union  decode_item
 
struct  decode_header
 
struct  decode_table
 
struct  decode_custom
 
struct  decode_simulate
 
struct  decode_emulate
 
struct  decode_or
 
struct  decode_reject
 

Macros

#define KPROBE_ARM_BREAKPOINT_INSTRUCTION   0x07f001f8
 
#define KPROBE_THUMB16_BREAKPOINT_INSTRUCTION   0xde18
 
#define KPROBE_THUMB32_BREAKPOINT_INSTRUCTION   0xf7f0a018
 
#define alu_write_pc_interworks   false
 
#define test_alu_write_pc_interworking()
 
#define is_writeback(insn)   ((insn ^ 0x01000000) & 0x01200000)
 
#define DECODE_TYPE_BITS   4
 
#define DECODE_TYPE_MASK   ((1 << DECODE_TYPE_BITS) - 1)
 
#define REGS(r16, r12, r8, r4, r0)
 
#define DECODE_END   {.bits = DECODE_TYPE_END}
 
#define DECODE_HEADER(_type, _mask, _value, _regs)
 
#define DECODE_TABLE(_mask, _value, _table)
 
#define DECODE_CUSTOM(_mask, _value, _decoder)
 
#define DECODE_SIMULATEX(_mask, _value, _handler, _regs)
 
#define DECODE_SIMULATE(_mask, _value, _handler)   DECODE_SIMULATEX(_mask, _value, _handler, 0)
 
#define DECODE_EMULATEX(_mask, _value, _handler, _regs)
 
#define DECODE_EMULATE(_mask, _value, _handler)   DECODE_EMULATEX(_mask, _value, _handler, 0)
 
#define DECODE_OR(_mask, _value)   DECODE_HEADER(DECODE_TYPE_OR, _mask, _value, 0)
 
#define DECODE_REJECT(_mask, _value)   DECODE_HEADER(DECODE_TYPE_REJECT, _mask, _value, 0)
 

Enumerations

enum  kprobe_insn { INSN_REJECTED, INSN_GOOD, INSN_GOOD_NO_SLOT }
 
enum  decode_type {
  DECODE_TYPE_END, DECODE_TYPE_TABLE, DECODE_TYPE_CUSTOM, DECODE_TYPE_SIMULATE,
  DECODE_TYPE_EMULATE, DECODE_TYPE_OR, DECODE_TYPE_REJECT, NUM_DECODE_TYPES
}
 
enum  decode_reg_type {
  REG_TYPE_NONE = 0, REG_TYPE_ANY, REG_TYPE_SAMEAS16, REG_TYPE_SP,
  REG_TYPE_PC, REG_TYPE_NOSP, REG_TYPE_NOSPPC, REG_TYPE_NOPC,
  REG_TYPE_NOPCWB, REG_TYPE_NOPCX, REG_TYPE_NOSPPCX, REG_TYPE_0 = REG_TYPE_NONE
}
 

Functions

enum kprobe_insn() kprobe_decode_insn_t (kprobe_opcode_t, struct arch_specific_insn *)
 
enum kprobe_insn arm_kprobe_decode_insn (kprobe_opcode_t, struct arch_specific_insn *)
 
void __init arm_kprobe_decode_init (void)
 
void __init find_str_pc_offset (void)
 
void __init test_load_write_pc_interworking (void)
 
void __kprobes kprobe_simulate_nop (struct kprobe *p, struct pt_regs *regs)
 
void __kprobes kprobe_emulate_none (struct kprobe *p, struct pt_regs *regs)
 
enum kprobe_insn __kprobes kprobe_decode_ldmstm (kprobe_opcode_t insn, struct arch_specific_insn *asi)
 
int kprobe_decode_insn (kprobe_opcode_t insn, struct arch_specific_insn *asi, const union decode_item *table, bool thumb16)
 

Variables

kprobe_check_cc *const kprobe_condition_checks [16]
 
int str_pc_offset
 
bool load_write_pc_interworks
 
union decode_item kprobe_decode_arm_table []
 

Macro Definition Documentation

#define alu_write_pc_interworks   false

Definition at line 144 of file kprobes.h.

#define DECODE_CUSTOM (   _mask,
  _value,
  _decoder 
)
Value:
DECODE_HEADER(DECODE_TYPE_CUSTOM, _mask, _value, 0), \
{.decoder = (_decoder)}

Definition at line 369 of file kprobes.h.

#define DECODE_EMULATE (   _mask,
  _value,
  _handler 
)    DECODE_EMULATEX(_mask, _value, _handler, 0)

Definition at line 396 of file kprobes.h.

#define DECODE_EMULATEX (   _mask,
  _value,
  _handler,
  _regs 
)
Value:
DECODE_HEADER(DECODE_TYPE_EMULATE, _mask, _value, _regs), \
{.handler = (_handler)}

Definition at line 392 of file kprobes.h.

#define DECODE_END   {.bits = DECODE_TYPE_END}

Definition at line 338 of file kprobes.h.

#define DECODE_HEADER (   _type,
  _mask,
  _value,
  _regs 
)
Value:
{.bits = (_type) | ((_regs) << DECODE_TYPE_BITS)}, \
{.bits = (_mask)}, \
{.bits = (_value)}

Definition at line 348 of file kprobes.h.

#define DECODE_OR (   _mask,
  _value 
)    DECODE_HEADER(DECODE_TYPE_OR, _mask, _value, 0)

Definition at line 404 of file kprobes.h.

#define DECODE_REJECT (   _mask,
  _value 
)    DECODE_HEADER(DECODE_TYPE_REJECT, _mask, _value, 0)

Definition at line 412 of file kprobes.h.

#define DECODE_SIMULATE (   _mask,
  _value,
  _handler 
)    DECODE_SIMULATEX(_mask, _value, _handler, 0)

Definition at line 383 of file kprobes.h.

#define DECODE_SIMULATEX (   _mask,
  _value,
  _handler,
  _regs 
)
Value:
DECODE_HEADER(DECODE_TYPE_SIMULATE, _mask, _value, _regs), \
{.handler = (_handler)}

Definition at line 379 of file kprobes.h.

#define DECODE_TABLE (   _mask,
  _value,
  _table 
)
Value:
DECODE_HEADER(DECODE_TYPE_TABLE, _mask, _value, 0), \
{.table = (_table)}

Definition at line 359 of file kprobes.h.

#define DECODE_TYPE_BITS   4

Definition at line 298 of file kprobes.h.

#define DECODE_TYPE_MASK   ((1 << DECODE_TYPE_BITS) - 1)

Definition at line 299 of file kprobes.h.

#define is_writeback (   insn)    ((insn ^ 0x01000000) & 0x01200000)

Definition at line 174 of file kprobes.h.

#define KPROBE_ARM_BREAKPOINT_INSTRUCTION   0x07f001f8

Definition at line 26 of file kprobes.h.

#define KPROBE_THUMB16_BREAKPOINT_INSTRUCTION   0xde18

Definition at line 27 of file kprobes.h.

#define KPROBE_THUMB32_BREAKPOINT_INSTRUCTION   0xf7f0a018

Definition at line 28 of file kprobes.h.

#define REGS (   r16,
  r12,
  r8,
  r4,
  r0 
)
Value:
((REG_TYPE_##r16) << 16) + \
((REG_TYPE_##r12) << 12) + \
((REG_TYPE_##r8) << 8) + \
((REG_TYPE_##r4) << 4) + \
(REG_TYPE_##r0)

Definition at line 323 of file kprobes.h.

#define test_alu_write_pc_interworking ( )

Definition at line 145 of file kprobes.h.

Enumeration Type Documentation

Enumerator:
REG_TYPE_NONE 
REG_TYPE_ANY 
REG_TYPE_SAMEAS16 
REG_TYPE_SP 
REG_TYPE_PC 
REG_TYPE_NOSP 
REG_TYPE_NOSPPC 
REG_TYPE_NOPC 
REG_TYPE_NOPCWB 
REG_TYPE_NOPCX 
REG_TYPE_NOSPPCX 
REG_TYPE_0 

Definition at line 301 of file kprobes.h.

Enumerator:
DECODE_TYPE_END 
DECODE_TYPE_TABLE 
DECODE_TYPE_CUSTOM 
DECODE_TYPE_SIMULATE 
DECODE_TYPE_EMULATE 
DECODE_TYPE_OR 
DECODE_TYPE_REJECT 
NUM_DECODE_TYPES 

Definition at line 287 of file kprobes.h.

Enumerator:
INSN_REJECTED 
INSN_GOOD 
INSN_GOOD_NO_SLOT 

Definition at line 31 of file kprobes.h.

Function Documentation

void __init arm_kprobe_decode_init ( void  )

Definition at line 77 of file kprobes-common.c.

enum kprobe_insn arm_kprobe_decode_insn ( kprobe_opcode_t  ,
struct arch_specific_insn  
)

Definition at line 1000 of file kprobes-arm.c.

void __init find_str_pc_offset ( void  )

Definition at line 32 of file kprobes-common.c.

int kprobe_decode_insn ( kprobe_opcode_t  insn,
struct arch_specific_insn asi,
const union decode_item table,
bool  thumb16 
)

Definition at line 518 of file kprobes-common.c.

enum kprobe_insn() kprobe_decode_insn_t ( kprobe_opcode_t  ,
struct arch_specific_insn  
)
enum kprobe_insn __kprobes kprobe_decode_ldmstm ( kprobe_opcode_t  insn,
struct arch_specific_insn asi 
)

Definition at line 280 of file kprobes-common.c.

void __kprobes kprobe_emulate_none ( struct kprobe p,
struct pt_regs regs 
)

Definition at line 180 of file kprobes-common.c.

void __kprobes kprobe_simulate_nop ( struct kprobe p,
struct pt_regs regs 
)

Definition at line 176 of file kprobes-common.c.

void __init test_load_write_pc_interworking ( void  )

Definition at line 53 of file kprobes-common.c.

Variable Documentation

kprobe_check_cc* const kprobe_condition_checks[16]

Definition at line 168 of file kprobes-common.c.

union decode_item kprobe_decode_arm_table[]

Definition at line 887 of file kprobes-arm.c.

bool load_write_pc_interworks

Definition at line 51 of file kprobes-common.c.

int str_pc_offset

Definition at line 30 of file kprobes-common.c.