lkml.org 
[lkml]   [2014]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [RFC PATCH 6/6] uprobes/x86: Emulate rip-relative conditional "near" jmp's
On 04/06, Oleg Nesterov wrote:
>
> But I'll try to cleanup this patch...

See v2 below.

-------------------------------------------------------------------------------
Subject: [RFC PATCH v2 6/6] uprobes/x86: Emulate rip-relative conditional "near" jmp's

It seems that 16bit condi jmp is just 0x0f + short_jump_opc_plus_0x10.

Reported-by: Jonathan Lebon <jlebon@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
arch/x86/kernel/uprobes.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
index 3865d8b..dae02f9 100644
--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -591,6 +591,10 @@ static int ttt_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn)
auprobe->ttt.opc1 = opc1;
break;

+ case 0x0f:
+ if (insn->opcode.nbytes != 2)
+ return -ENOSYS;
+ opc1 = OPCODE2(insn) - 0x10;
default:
if (!is_cond_jmp_opcode(opc1))
return -ENOSYS;
--
1.5.5.1



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