[PATCH v2 1/3] sh: push extra copy of r0-r2 for syscall parameters

2014-02-18 Thread Bobby Bingham
parameters to the stack, so that the authoritative set of saved register values does not get clobbered. A few system call handlers are also updated to get the userspace registers using current_pt_regs() instead of from the stack. Signed-off-by: Bobby Bingham --- arch/sh/include/asm/syscalls_32

[PATCH v2 0/3] Don't let system calls clobber userspace registers

2014-02-18 Thread Bobby Bingham
s since V1: - Update messages for [2/3] to quote the short log of the previous commit that left do_fpu_error unused. Bobby Bingham (3): sh: push extra copy of r0-r2 for syscall parameters sh: remove unused do_fpu_error sh: don't pass saved userspace state to exception handlers arch

[PATCH v2 2/3] sh: remove unused do_fpu_error

2014-02-18 Thread Bobby Bingham
This does not appear to have been used since commit 74d99a5e262229ee865f6f68528d10b82471ead6 (sh: SH-2A FPU support) in 2007. Signed-off-by: Bobby Bingham --- arch/sh/math-emu/math.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/arch/sh/math-emu/math.c b/arch/sh/math

[PATCH v2 3/3] sh: don't pass saved userspace state to exception handlers

2014-02-18 Thread Bobby Bingham
The compiler is permitted to generate code which overwrites the parameters to a function. If those parameters include the only saved copy we have of userspace's registers, we're in trouble. Signed-off-by: Bobby Bingham --- arch/sh/include/asm/traps_32.h | 16 arch