[lkml]   [2014]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH v2 5/6] uprobes/x86: Emulate rip-relative conditional "short" jmp's
On 04/07, Oleg Nesterov wrote:
> > Incomplete, lacks "jcxz". Simple to fix. Anything else?
> Please see v2 below. Simplify the preprocessor hacks.

Finally some testing. This all even seems to work... Although so far
I only tested jz/jnz 8/32bit with this test-case:

asm (
".globl test_0\n"

"movq $0, %rax\n"
"cmpq $0, %rax\n"

".globl t_0_n; t_0_n:\n"
"jnz 1f\n"

".globl t_0_y; t_0_y:\n"
"jz 2f\n"

"1: ud2\n"
"2: retq\n"

asm (
".globl test_1\n"

"movq $1, %rax\n"
"cmpq $0, %rax\n"

".globl t_1_y; t_1_y:\n"
"jz 1f\n"

".globl t_1_n; t_1_n:\n"
"jnz 2f\n"

".org . + 1024\n"

"1: ud2\n"
"2: retq\n"

extern void test_0(void), test_1(void);

int main(void)
return 0;

it runs fine with t_{0,1}_{y,} probed.

As for "jcxz" support, it must be simple but I am still googling for
"jcxz for dummies". Will do tomorrow, probably I'll make a separate patch
for this to simlify the review.


 \ /
  Last update: 2014-04-07 19:21    [W:0.093 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site