]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/ppc-fix-ppc-insn-emulation_mr.patch
Imported linux-2.6.27.39 suse/xen patches.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / ppc-fix-ppc-insn-emulation_mr.patch
CommitLineData
2cb7cef9
BS
1Subject: Don't emulate mr. instructions
2From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
3References: 459387 - LTC49903
4
5Currently emulate_step() emulates mr. instructions without updating cr0
6and this can be disastrous. Don't emulate mr.
7
8Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
9Signed-off-by: Olaf Hering <olh@suse.de>
10
11---
12 arch/powerpc/lib/sstep.c | 2 ++
13 1 file changed, 2 insertions(+)
14
15--- a/arch/powerpc/lib/sstep.c
16+++ b/arch/powerpc/lib/sstep.c
17@@ -172,6 +172,8 @@ int __kprobes emulate_step(struct pt_reg
18 }
19 break;
20 case 0x378: /* orx */
21+ if (instr & 1)
22+ break;
23 rs = (instr >> 21) & 0x1f;
24 rb = (instr >> 11) & 0x1f;
25 if (rs == rb) { /* mr */