(2012/01/10 20:48), Srikar Dronamraju wrote: > +static void handle_riprel_insn(struct mm_struct *mm, struct uprobe *uprobe, > + struct insn *insn) > +{ > + u8 *cursor; > + u8 reg; > + > + if (mm->context.ia32_compat) > + return; > + > + uprobe->arch_info.rip_rela_target_address = 0x0; > + if (!insn_rip_relative(insn)) > + return; > + > + /* > + * Point cursor at the modrm byte. The next 4 bytes are the > + * displacement. Beyond the displacement, for some instructions, > + * is the immediate operand. > + */ > + cursor = uprobe->insn + insn->prefixes.nbytes > + + insn->rex_prefix.nbytes + insn->opcode.nbytes; FYI, insn.h already provide a macro for this purpose. You can write this as below; cursor = uprobe->insn + insn_offset_modrm(insn); Thank you, -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@xxxxxxxxxxx -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>