Skip to contentSkip to conversation

Generate SIGILL again

PATCH Daniel Jacobowitz 1 participant 1 message Nov 27, 2005 MIPS

lore
Share & tools
lore
#0 lore raw

The rdhwr emulation accidentally swallowed the SIGILL from most other illegal instructions. Make sure to return -EFAULT by default.

arch/mips/kernel/traps.c +3 -2
index 7f60f61..63db2fa 100644
@@ -534,13 +534,14 @@ static inline int simulate_rdhwr(struct 
 		switch (rd) {
 			case 29:
 				regs->regs[rt] = ti->tp_value;
-				break;
+				return 0;
 			default:
 				return -EFAULT;
 		}
 	}
 
-	return 0;
+	/* Not ours.  */
+	return -EFAULT;
 }
 
 asmlinkage void do_ov(struct pt_regs *regs)
Signature · 2 lines
Daniel Jacobowitz
CodeSourcery, LLC