uprobes/x86: Emulate relative conditional "short" jmp's
authorOleg Nesterov <oleg@redhat.com>
Sun, 6 Apr 2014 19:53:47 +0000 (21:53 +0200)
committerOleg Nesterov <oleg@redhat.com>
Thu, 17 Apr 2014 19:58:23 +0000 (21:58 +0200)
commit8f95505bc18a026ef7d3dfdbce4e5b31b3e4fc1b
tree2c70b00894728300f34a2a2b63855d9b1e83b79d
parent8e89c0be171b1a9ed2ba67168733ca811bb45d5c
uprobes/x86: Emulate relative conditional "short" jmp's

Teach branch_emulate_op() to emulate the conditional "short" jmp's which
check regs->flags.

Note: this doesn't support jcxz/jcexz, loope/loopz, and loopne/loopnz.
They all are rel8 and thus they can't trigger the problem, but perhaps
we will add the support in future just for completeness.

Reported-by: Jonathan Lebon <jlebon@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Jim Keniston <jkenisto@us.ibm.com>
arch/x86/kernel/uprobes.c