Re: [PATCH] uprobes: use BX register for rip-relative fixups, not AX

2014-04-30 Thread Jim Keniston
On Mon, 2014-04-28 at 19:06 +0200, Denys Vlasenko wrote: > Otherwise, instructions such as cmpxchg and div will be mishandled. > > Signed-off-by: Denys Vlasenko > CC: Jim Keniston > CC: Masami Hiramatsu > CC: Srikar Dronamraju > CC: Ingo Molnar > CC: Oleg Nesterov > --- > arch/x86/kernel/up

Re: [PATCH] uprobes: use BX register for rip-relative fixups, not AX

2014-04-29 Thread Denys Vlasenko
On 04/28/2014 09:23 PM, Oleg Nesterov wrote: > On 04/28, Denys Vlasenko wrote: >> >> On 04/28/2014 07:34 PM, Oleg Nesterov wrote: >>> >>> It seems that you are right. But it would be really great if you also >>> provide the test-case which proves the fix ;) >> >> Working on a testcase for this. So

Re: [PATCH] uprobes: use BX register for rip-relative fixups, not AX

2014-04-28 Thread Oleg Nesterov
Thanks... Again, the change in riprel_analyze() needs the review from someone who understands the instruction decoding/encoding. On 04/28, Denys Vlasenko wrote: > > Otherwise, instructions such as cmpxchg and div will be mishandled. It seems that you are right. But it would be really great if yo

Re: [PATCH] uprobes: use BX register for rip-relative fixups, not AX

2014-04-28 Thread Denys Vlasenko
On 04/28/2014 07:06 PM, Denys Vlasenko wrote: > + * Note: we can't use rax or rdx registers as scratch! > + * There are 3-operand insns which use rax or rdx:rax > + * as an implicit operand, _and_ they use modrm byte > + * whose reg field indicates third register or opcode exten

Re: [PATCH] uprobes: use BX register for rip-relative fixups, not AX

2014-04-28 Thread Denys Vlasenko
On 04/28/2014 07:34 PM, Oleg Nesterov wrote: > Thanks... > > Again, the change in riprel_analyze() needs the review from someone > who understands the instruction decoding/encoding. > > On 04/28, Denys Vlasenko wrote: >> >> Otherwise, instructions such as cmpxchg and div will be mishandled. > >

Re: [PATCH] uprobes: use BX register for rip-relative fixups, not AX

2014-04-28 Thread Oleg Nesterov
On 04/28, Denys Vlasenko wrote: > > On 04/28/2014 07:34 PM, Oleg Nesterov wrote: > > > > It seems that you are right. But it would be really great if you also > > provide the test-case which proves the fix ;) > > Working on a testcase for this. So far covered div (test1) > and cmpxchg (test2). > >