]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Send SIGILL for R6 branches in `__compute_return_epc_for_insn'
authorMaciej W. Rozycki <macro@imgtec.com>
Thu, 15 Jun 2017 23:14:12 +0000 (00:14 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 29 Jun 2017 00:42:27 +0000 (02:42 +0200)
commitb03a574b0541d8aee7dde2568437b8fa8e902f2f
treeaf49815a6620de3289c2d5d9b0273f87251a7a6f
parente04cf23f348107c25c3f056fbc7dedc55bdb7b50
MIPS: Send SIGILL for R6 branches in `__compute_return_epc_for_insn'

Fix:

* commit 4989e2025b36 ("MIPS: Emulate the new MIPS R6 branch compact
(BC) instruction"),

* commit 86decd8820a1 ("MIPS: Emulate the new MIPS R6 BALC
instruction"),

* commit 6c2cac21e771 ("MIPS: Emulate the new MIPS R6 BEQZC and JIC
instructions"),

* commit 856f55cb2b6f ("MIPS: Emulate the new MIPS R6 BNEZC and JIALC
instructions"),

* commit ff0f4826d0fd ("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: 4989e2025b36 ("MIPS: Emulate the new MIPS R6 branch compact (BC) instruction")
Fixes: 86decd8820a1 ("MIPS: Emulate the new MIPS R6 BALC instruction")
Fixes: 6c2cac21e771 ("MIPS: Emulate the new MIPS R6 BEQZC and JIC instructions")
Fixes: 856f55cb2b6f ("MIPS: Emulate the new MIPS R6 BNEZC and JIALC instructions")
Fixes: ff0f4826d0fd ("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>
arch/mips/kernel/branch.c