diff options
author | Vyacheslav Cherkashin <v.cherkashin@samsung.com> | 2013-05-27 09:40:15 +0400 |
---|---|---|
committer | Vyacheslav Cherkashin <v.cherkashin@samsung.com> | 2013-05-27 15:31:04 +0400 |
commit | 92b9ab773210e5c5d2a49177f185e040cf61a749 (patch) | |
tree | 17b84e91cb37816f1bc21081401041cbe6880ea4 /kprobe | |
parent | 035ab7da56300cc7711b8e1813c8d13bdf11da5b (diff) | |
download | swap-modules-92b9ab773210e5c5d2a49177f185e040cf61a749.tar.gz swap-modules-92b9ab773210e5c5d2a49177f185e040cf61a749.tar.bz2 swap-modules-92b9ab773210e5c5d2a49177f185e040cf61a749.zip |
[FEATURE] add instrumentation US for x86
Diffstat (limited to 'kprobe')
-rw-r--r-- | kprobe/arch/asm-x86/dbi_kprobes.c | 11 | ||||
-rw-r--r-- | kprobe/arch/asm-x86/dbi_kprobes.h | 5 |
2 files changed, 8 insertions, 8 deletions
diff --git a/kprobe/arch/asm-x86/dbi_kprobes.c b/kprobe/arch/asm-x86/dbi_kprobes.c index 17420734..faf41ef9 100644 --- a/kprobe/arch/asm-x86/dbi_kprobes.c +++ b/kprobe/arch/asm-x86/dbi_kprobes.c @@ -216,7 +216,7 @@ static void set_user_jmp_op (void *from, void *to) /* * returns non-zero if opcodes can be boosted. */ -static __always_inline int can_boost (kprobe_opcode_t * opcodes) +int can_boost(kprobe_opcode_t *opcodes) { #define W(row,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,ba,bb,bc,bd,be,bf) \ (((b0##UL << 0x0)|(b1##UL << 0x1)|(b2##UL << 0x2)|(b3##UL << 0x3) | \ @@ -296,6 +296,7 @@ retry: return (opcode != 0x2e && opcode != 0x9a); } } +EXPORT_SYMBOL_GPL(can_boost); /* * returns non-zero if opcode modifies the interrupt flag. @@ -313,12 +314,6 @@ static int is_IF_modifier (kprobe_opcode_t opcode) return 0; } -int arch_check_insn (struct arch_specific_insn *ainsn) -{ - DBPRINTF("Warrning: arch_check_insn is not implemented for x86\n"); - return 0; -} - int arch_prepare_kprobe(struct kprobe *p, struct slot_manager *sm) { kprobe_opcode_t insns[KPROBES_TRAMP_LEN]; @@ -382,7 +377,7 @@ void prepare_singlestep (struct kprobe *p, struct pt_regs *regs) regs->EREG (ip) = (unsigned long) p->ainsn.insn; } } - +EXPORT_SYMBOL_GPL(prepare_singlestep); void save_previous_kprobe (struct kprobe_ctlblk *kcb, struct kprobe *cur_p) { diff --git a/kprobe/arch/asm-x86/dbi_kprobes.h b/kprobe/arch/asm-x86/dbi_kprobes.h index 52ed3fa3..52c7f84a 100644 --- a/kprobe/arch/asm-x86/dbi_kprobes.h +++ b/kprobe/arch/asm-x86/dbi_kprobes.h @@ -227,6 +227,11 @@ void arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs) void kretprobe_trampoline(void); void restore_previous_kprobe(struct kprobe_ctlblk *kcb); +int can_boost(kprobe_opcode_t *opcodes); +static inline int arch_check_insn(struct arch_specific_insn *ainsn) +{ + return 0; +} int arch_init_kprobes(void); void arch_exit_kprobes(void); |