]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sparc: Fix system call tracing register handling.
authorMike Frysinger <vapier@gentoo.org>
Mon, 18 Jan 2016 11:32:30 +0000 (06:32 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Jun 2016 17:18:21 +0000 (10:18 -0700)
commitc9bc125c922e855055cd08b2ec064180218be161
treed0755f0f542490a949a868a5207275641603c310
parent2b11d80e1aa70b56c6431e4dc3c686ffc61a73bf
sparc: Fix system call tracing register handling.

[ Upstream commit 1a40b95374f680625318ab61d81958e949e0afe3 ]

A system call trace trigger on entry allows the tracing
process to inspect and potentially change the traced
process's registers.

Account for that by reloading the %g1 (syscall number)
and %i0-%i5 (syscall argument) values.  We need to be
careful to revalidate the range of %g1, and reload the
system call table entry it corresponds to into %l7.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tested-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/sparc/kernel/entry.S
arch/sparc/kernel/syscalls.S