]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix seccomp syscall argument for MIPS64
authorMarkos Chandras <markos.chandras@imgtec.com>
Thu, 13 Aug 2015 07:47:59 +0000 (08:47 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Sun, 16 Aug 2015 13:00:59 +0000 (15:00 +0200)
commitdc8b48d012850d7c5c9b8620d51dd93387d3a9d8
tree7bdb85d2b3260abb9824a144c94cc349742273ee
parentff0ffcac2f691cccf6819bd3a07f6659607f7a62
MIPS: Fix seccomp syscall argument for MIPS64

Commit d7da64da6df1 ("MIPS: seccomp: Handle indirect system calls (o32)")
fixed indirect system calls on O32 but it also introduced a bug for MIPS64
where it erroneously modified the v0 (syscall) register with the assumption
that the sycall offset hasn't been taken into consideration. This breaks
seccomp on MIPS64 n64 and n32 ABIs. We fix this by replacing the addition
with a move instruction.

Fixes: d7da64da6df1 ("MIPS: seccomp: Handle indirect system calls (o32)")
Cc: <stable@vger.kernel.org> # 3.15+
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10951/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/scall64-64.S
arch/mips/kernel/scall64-n32.S