Re: [PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-05 Thread Jim Keniston
On Fri, 2014-05-02 at 17:04 +0200, Denys Vlasenko wrote: > On 05/02/2014 02:48 AM, Jim Keniston wrote: > > On Thu, 2014-05-01 at 19:09 +0200, Denys Vlasenko wrote: > >> +#define VEX2_(insn) X86_VEX_V((insn)->vex_prefix.bytes[1]) > >> +#define VEX3_(insn)

Re: [PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-05 Thread Jim Keniston
On Fri, 2014-05-02 at 17:04 +0200, Denys Vlasenko wrote: On 05/02/2014 02:48 AM, Jim Keniston wrote: On Thu, 2014-05-01 at 19:09 +0200, Denys Vlasenko wrote: +#define VEX2_(insn) X86_VEX_V((insn)-vex_prefix.bytes[1]) +#define VEX3_(insn)

Re: [PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-02 Thread Denys Vlasenko
On 05/02/2014 02:48 AM, Jim Keniston wrote: > On Thu, 2014-05-01 at 19:09 +0200, Denys Vlasenko wrote: >> +#define VEX2_(insn) X86_VEX_V((insn)->vex_prefix.bytes[1]) >> +#define VEX3_(insn) X86_VEX_V((insn)->vex_prefix.bytes[2]) > > I disclaim any knowledge about

Re: [PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-02 Thread Denys Vlasenko
On 05/02/2014 02:48 AM, Jim Keniston wrote: On Thu, 2014-05-01 at 19:09 +0200, Denys Vlasenko wrote: +#define VEX2_(insn) X86_VEX_V((insn)-vex_prefix.bytes[1]) +#define VEX3_(insn) X86_VEX_V((insn)-vex_prefix.bytes[2]) I disclaim any knowledge about VEX*

Re: [PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-01 Thread Jim Keniston
On Thu, 2014-05-01 at 19:09 +0200, Denys Vlasenko wrote: > Before this patch, instructions such as div, mul, > shifts with count in CL, cmpxchg are mishandled. > > This patch adds vex prefix handling. In particular, > it avoids colliding with register operand encoded > in vex. field. > >

Re: [PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-01 Thread Oleg Nesterov
On 05/01, Denys Vlasenko wrote: > > Before this patch, instructions such as div, mul, > shifts with count in CL, cmpxchg are mishandled. Thanks. I'll try to read this patch tomorrow, but you do know that I can't review (or even understand ;) the change in riprel_analyze(). As for other changes,

[PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-01 Thread Denys Vlasenko
Before this patch, instructions such as div, mul, shifts with count in CL, cmpxchg are mishandled. This patch adds vex prefix handling. In particular, it avoids colliding with register operand encoded in vex. field. Since we need to avoid two possible register operands, the selection of

[PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-01 Thread Denys Vlasenko
Before this patch, instructions such as div, mul, shifts with count in CL, cmpxchg are mishandled. This patch adds vex prefix handling. In particular, it avoids colliding with register operand encoded in vex. field. Since we need to avoid two possible register operands, the selection of

Re: [PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-01 Thread Oleg Nesterov
On 05/01, Denys Vlasenko wrote: Before this patch, instructions such as div, mul, shifts with count in CL, cmpxchg are mishandled. Thanks. I'll try to read this patch tomorrow, but you do know that I can't review (or even understand ;) the change in riprel_analyze(). As for other changes,

Re: [PATCH] uprobes: fix scratch register selection for rip-relative fixups

2014-05-01 Thread Jim Keniston
On Thu, 2014-05-01 at 19:09 +0200, Denys Vlasenko wrote: Before this patch, instructions such as div, mul, shifts with count in CL, cmpxchg are mishandled. This patch adds vex prefix handling. In particular, it avoids colliding with register operand encoded in vex. field. Since we