Skip to content

Commit

Permalink
powerpc: Fix single step emulation of 32bit overflowed branches
Browse files Browse the repository at this point in the history
Check truncate_if_32bit() on final write to nip.

Signed-off-by: Michael Neuling <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
  • Loading branch information
mikey authored and ozbenh committed Jun 20, 2013
1 parent b9ef7d6 commit 70a54a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/lib/sstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
if (instr & 1)
regs->link = regs->nip;
if (branch_taken(instr, regs))
regs->nip = imm;
regs->nip = truncate_if_32bit(regs->msr, imm);
return 1;
#ifdef CONFIG_PPC64
case 17: /* sc */
Expand Down

0 comments on commit 70a54a4

Please sign in to comment.