]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] kprobes: bad manipulation of 2 byte opcode on x86_64
authorSatoshi Oshima <soshima@redhat.com>
Sat, 20 May 2006 22:00:21 +0000 (15:00 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 21 May 2006 19:59:21 +0000 (12:59 -0700)
commit5f6621f0f6e5f03cc5cb6b3ff9d3d9c81b6d5a97
treeeb164ad61b92f2df2ffab9628adffe06e635c8e2
parent80b4d19830249bb7a21e5de01e7f11f898604de9
[PATCH] kprobes: bad manipulation of 2 byte opcode on x86_64

Problem:

If we put a probe onto a callq instruction and the probe is executed,
kernel panic of Bad RIP value occurs.

Root cause:

If resume_execution() found 0xff at first byte of p->ainsn.insn, it must
check the _second_ byte.  But current resume_execution check _first_ byte
again.

I changed it checks second byte of p->ainsn.insn.

Kprobes on i386 don't have this problem, because the implementation is a
little bit different from x86_64.

Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Satoshi Oshima <soshima@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/kprobes.c