MIPS: Send SIGILL for R6 branches in `__compute_return_epc_for_insn'
Fix:
* commit
63c6151303db ("MIPS: Emulate the new MIPS R6 branch compact
(BC) instruction"),
* commit
3b0b4794bc0b ("MIPS: Emulate the new MIPS R6 BALC
instruction"),
* commit
03c86cf1fa62 ("MIPS: Emulate the new MIPS R6 BEQZC and JIC
instructions"),
* commit
f136ca430a66 ("MIPS: Emulate the new MIPS R6 BNEZC and JIALC
instructions"),
* commit
266a7d481438 ("MIPS: Emulate the new MIPS R6 BOVC, BEQC and
BEQZALC instructions")
and send SIGILL rather than returning -SIGILL for R6 branch and jump
instructions. Returning -SIGILL is never correct as the API defines
this function's result upon error to be -EFAULT and a signal actually
issued.
Fixes: 63c6151303db ("MIPS: Emulate the new MIPS R6 branch compact (BC) instruction")
Fixes: 3b0b4794bc0b ("MIPS: Emulate the new MIPS R6 BALC instruction")
Fixes: 03c86cf1fa62 ("MIPS: Emulate the new MIPS R6 BEQZC and JIC instructions")
Fixes: f136ca430a66 ("MIPS: Emulate the new MIPS R6 BNEZC and JIALC instructions")
Fixes: 266a7d481438 ("MIPS: Emulate the new MIPS R6 BOVC, BEQC and BEQZALC instructions")
Signed-off-by: Maciej W. Rozycki <macro@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org # 3.19+
Patchwork: https://patchwork.linux-mips.org/patch/16399/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>