From de14b6dab7064616fe2828c7ead9cca6a48463ce Mon Sep 17 00:00:00 2001 From: kenistoj Date: Tue, 16 Oct 2007 23:40:49 +0000 Subject: * runtime/uprobes/uprobes.[ch], uprobes_i386.[ch], uprobes_ppc64.h, uprobes_s390.h: Adjusted SLOT_IP and arch_validate_probed_insn to accept task pointer (needed by x86_64); added uprobe_probept_arch_info and uprobe_task_arch_info (ditto). * runtime/uprobes/uprobes_i386.c: Fixed a couple of glitches discovered when porting to x86_64 --- runtime/uprobes/uprobes_i386.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'runtime/uprobes/uprobes_i386.h') diff --git a/runtime/uprobes/uprobes_i386.h b/runtime/uprobes/uprobes_i386.h index 6e2aae70..e4376b95 100644 --- a/runtime/uprobes/uprobes_i386.h +++ b/runtime/uprobes/uprobes_i386.h @@ -32,17 +32,22 @@ typedef u8 uprobe_opcode_t; #define BREAKPOINT_INSTRUCTION 0xcc #define BP_INSN_SIZE 1 #define MAX_UINSN_BYTES 16 -#define SLOT_IP 12 /* instruction pointer slot from include/asm/elf.h */ +#define SLOT_IP(tsk) 12 /* instruction pointer slot from include/asm/elf.h */ #define BREAKPOINT_SIGNAL SIGTRAP #define SSTEP_SIGNAL SIGTRAP +struct uprobe_probept_arch_info {}; +struct uprobe_task_arch_info {}; + /* Architecture specific switch for where the IP points after a bp hit */ #define ARCH_BP_INST_PTR(inst_ptr) (inst_ptr - BP_INSN_SIZE) struct uprobe_probept; struct uprobe_task; -static int arch_validate_probed_insn(struct uprobe_probept *ppt); +struct task_struct; +static int arch_validate_probed_insn(struct uprobe_probept *ppt, + struct task_struct *tsk); /* On i386, the int3 traps leaves eip pointing past the int3 instruction. */ static inline unsigned long arch_get_probept(struct pt_regs *regs) -- cgit