All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix fall-through from case 30 (rld*) to case 31
@ 2016-01-25  6:55 Oliver O'Halloran
  2016-01-27  0:52 ` Andrew Donnellan
  2016-02-15 23:28 ` [PATCH] powerpc/lib/sstep.c - Fix emulation fall-through Oliver O'Halloran
  0 siblings, 2 replies; 8+ messages in thread
From: Oliver O'Halloran @ 2016-01-25  6:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Oliver O'Halloran

I think this bug can only be triggered if the instruction to
simulate is malformed. The switch in the else case only handles
the zero and one case, but it extracts bits 4:1 from the
instruction word so it may be other values. It's pretty minor, but
a bug is a bug.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 arch/powerpc/lib/sstep.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index dc885b3..e25f73c 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -925,6 +925,7 @@ int __kprobes analyse_instr(struct instruction_op *op, struct pt_regs *regs,
 			}
 		}
 #endif
+	break; /* illegal instruction */
 
 	case 31:
 		switch ((instr >> 1) & 0x3ff) {
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-05-10 21:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25  6:55 [PATCH] Fix fall-through from case 30 (rld*) to case 31 Oliver O'Halloran
2016-01-27  0:52 ` Andrew Donnellan
2016-01-27  5:29   ` oliver
2016-01-27  7:00     ` Andrew Donnellan
2016-02-15 23:28 ` [PATCH] powerpc/lib/sstep.c - Fix emulation fall-through Oliver O'Halloran
2016-02-16  0:59   ` Andrew Donnellan
2016-02-16  6:31     ` [PATCH v2] powerpc/sstep.c " Oliver O'Halloran
2016-05-10 21:48       ` [v2] " Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.