Re: [RFC PATCH] uprobes: simplify rip-relative handling

From: Oleg Nesterov
Date: Sun Apr 27 2014 - 09:13:44 EST


On 04/27, Oleg Nesterov wrote:
>
> On 04/26, Denys Vlasenko wrote:
> >
> > @@ -46,7 +46,7 @@ struct arch_uprobe {
> >
> > union {
> > #ifdef CONFIG_X86_64
> > - unsigned long rip_rela_target_address;
> > + int insn_length;
> > #endif
>
> in particular, we already have auprobe->def.ilen this patch can use.

And I forgot to mention...

I can easily misunderstand the change in handle_riprel_insn(), but it
seems that since you removed memmove(cursor, ...) the changed insn has
the same lenghth as the original insn?

If yes,

- the patch is wrong, it breaks the "correction" logic

- but, at the same time, we can simplify this logic and
just kill the "long *correction" arg of riprel_post_xol.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/