MIPS: scall64-o32: Fix indirect syscall detection
authorMarkos Chandras <markos.chandras@imgtec.com>
Thu, 24 Jul 2014 11:10:02 +0000 (12:10 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 26 Aug 2014 00:18:56 +0000 (02:18 +0200)
commitad61ba23f192f6d87a4e1f665f2d92ba2bae0950
treed9ac9b78413fc9867d824b109744a180bde72272
parent8d74ea0edb83a57f793a55bb7360a17af8ade5d1
MIPS: scall64-o32: Fix indirect syscall detection

Commit 4c21b8fd8f14 (MIPS: seccomp: Handle indirect system calls (o32))
added indirect syscall detection for O32 processes running on MIPS64
but it did not work as expected. The reason is the the scall64-o32
implementation differs compared to scall32-o32. In the former, the v0
(syscall number) register contains the absolute syscall number
(4000 + X) whereas in the latter it contains the relative syscall
number (X). Fix the code to avoid doing an extra addition, and load
the v0 register directly to the first argument for syscall_trace_enter.
Moreover, set the .reorder assembler option in order to have better
control on this part of the assembly code.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: http://patchwork.linux-mips.org/patch/7481/
Cc: <stable@vger.kernel.org> # v3.15+
Signed-off-by: James Hogan <james.hogan@imgtec.com>
arch/mips/kernel/scall64-o32.S
This page took 0.024493 seconds and 5 git commands to generate.