Messages in this thread | | | Subject | Re: [PATCH 5/7] uprobes/x86: Gather "riprel" functions together | From | Jim Keniston <> | Date | Wed, 02 Apr 2014 12:53:15 -0700 |
| |
On Mon, 2014-03-31 at 21:44 +0200, Oleg Nesterov wrote: ... > +static void > +handle_riprel_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs, long *correction) > +{ > + if (auprobe->fixups & (UPROBE_FIX_RIP_AX | UPROBE_FIX_RIP_CX)) { > + struct arch_uprobe_task *autask; > + > + autask = ¤t->utask->autask; > + if (auprobe->fixups & UPROBE_FIX_RIP_AX) > + regs->ax = autask->saved_scratch_register; > + else > + regs->cx = autask->saved_scratch_register; > + > + /* > + * The original instruction includes a displacement, and so > + * is 4 bytes longer than what we've just single-stepped. > + * Fall through to handle stuff like "jmpq *...(%rip)" and > + * "callq *...(%rip)". > + */ > + if (correction) > + *correction += 4; > + } > +}
This is another case of a glitch in the code being moved. Since this code was moved to its own function, the "Fall through" comment makes no sense. Maybe * Caller may need to apply other fixups to handle stuff * like "jmpq *...(%rip)" and "callq *...(%rip)".
Jim
| |