]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Jan 2016 00:06:00 +0000 (16:06 -0800)
commit5e24c7c30f2890517897e15024028e7d9bda288f
tree6340453bf231d117cd93aa6cc02556af3403ae2f
parentc51ebd5ac1cb9bbf61fd0870094c040f1095fe92
sparc: Fix system call tracing register handling.

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>
arch/sparc/kernel/entry.S
arch/sparc/kernel/syscalls.S