Michael Ellerman 1cb9839b73 powerpc: Use orig_gpr3 in syscall_get_arguments()
Currently syscall_get_arguments() is used by syscall tracepoints, and
collect_syscall() which is used in some debugging as well as
/proc/pid/syscall.

The current implementation just copies regs->gpr[3 .. 5] out, which is
fine for all the current use cases.

When we enable seccomp filter, that will also start using
syscall_get_arguments(). However for seccomp filter we want to use r3
as the return value of the syscall, and orig_gpr3 as the first
parameter. This will allow seccomp to modify the return value in r3.

To support this we need to modify syscall_get_arguments() to return
orig_gpr3 instead of r3. This is safe for all uses because orig_gpr3
always contains the r3 value that was passed to the syscall. We store it
in the syscall entry path and never modify it.

Update syscall_set_arguments() while we're here, even though it's never
used.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Kees Cook <keescook@chromium.org>
2015-07-29 11:56:13 +10:00
..
2014-08-14 12:48:11 +02:00
2015-05-13 10:55:42 +02:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2015-07-13 10:10:54 +10:00
2013-04-18 13:03:53 +10:00
2015-05-28 15:31:53 +02:00
2014-04-09 12:53:28 +10:00
2012-03-28 18:30:02 +01:00
2015-04-07 17:15:13 +10:00
2014-01-23 16:36:54 -08:00
2011-11-08 14:51:46 +11:00
2014-06-25 18:49:40 -05:00
2015-01-12 05:04:13 -08:00
2015-02-03 18:47:18 +01:00
2014-11-03 12:12:32 +11:00
2012-03-20 21:48:30 +08:00
2015-05-11 15:06:39 +08:00
2014-12-11 17:48:14 -08:00
2015-07-13 10:10:54 +10:00
2015-02-23 14:52:04 +11:00
2011-07-26 16:49:47 -07:00
2013-12-09 11:40:25 +11:00
2015-06-24 17:49:41 -07:00
2014-07-28 14:10:23 +10:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2015-05-11 15:06:39 +08:00
2013-11-06 14:13:49 +11:00
2015-03-06 23:21:07 +01:00
2012-09-17 16:31:51 +10:00
2011-03-31 11:26:23 -03:00
2015-05-20 10:42:05 +10:00
2011-03-31 11:26:23 -03:00
2014-02-17 11:19:37 +11:00
2015-05-05 13:35:39 -06:00
2013-10-30 16:02:28 +11:00