aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib/sstep.c
diff options
context:
space:
mode:
authorAnanth N Mavinakayanahalli <ananth@in.ibm.com>2009-02-05 21:02:00 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-02-09 22:39:07 -0500
commiteef336189b2b5ae68bfbef0df24176a4a152d981 (patch)
tree53bc8eba3f2a23911430f9319ddc8609c6c8472d /arch/powerpc/lib/sstep.c
parent6c24b17453c8dc444a746e45b8a404498fc9fcf7 (diff)
powerpc: Don't emulate mr. instructions
Currently emulate_step() emulates mr. instructions without updating cr0 and this can be disastrous. Don't emulate mr. This bug has been around for a while, but I am not sure if its a worthy -stable candidate. I'll leave it to Ben do decide. Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/lib/sstep.c')
-rw-r--r--arch/powerpc/lib/sstep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 4aae0c387645..13b7d54f185b 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -172,6 +172,8 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
172 } 172 }
173 break; 173 break;
174 case 0x378: /* orx */ 174 case 0x378: /* orx */
175 if (instr & 1)
176 break;
175 rs = (instr >> 21) & 0x1f; 177 rs = (instr >> 21) & 0x1f;
176 rb = (instr >> 11) & 0x1f; 178 rb = (instr >> 11) & 0x1f;
177 if (rs == rb) { /* mr */ 179 if (rs == rb) { /* mr */