WSL2-Linux-Kernel/arch/sparc
Al Viro c27ca4aebb sparc32: fix a braino in fault handling in csum_and_copy_..._user()
commit 1f36cd05e0 upstream.

Fault handler used to make non-trivial calls, so it needed
to set a stack frame up.  Used to be
	save ... - grab a stack frame, old %o... become %i...
	....
	ret	- go back to address originally in %o7, currently %i7
	 restore - switch to previous stack frame, in delay slot
Non-trivial calls had been gone since ab5e8b3312 and that code should
have become
	retl	- go back to address in %o7
	 clr %o0 - have return value set to 0
What it had become instead was
	ret	- go back to address in %i7 - return address of *caller*
	 clr %o0 - have return value set to 0
which is not good, to put it mildly - we forcibly return 0 from
csum_and_copy_{from,to}_iter() (which is what the call of that
thing had been inlined into) and do that without dropping the
stack frame of said csum_and_copy_..._iter().  Confuses the
hell out of the caller of csum_and_copy_..._iter(), obviously...

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Fixes: ab5e8b3312 "sparc32: propagate the calling conventions change down to __csum_partial_copy_sparc_generic()"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-08 17:26:42 +01:00
..
boot sparc: Add missing "FORCE" target when using if_changed 2021-11-18 19:17:00 +01:00
configs
crypto
include sparc/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:58:31 +02:00
kernel sparc/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:58:31 +02:00
lib sparc32: fix a braino in fault handling in csum_and_copy_..._user() 2023-11-08 17:26:42 +01:00
math-emu
mm dma-mapping updates for Linux 5.15 2021-09-02 10:32:06 -07:00
net bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-07-29 00:20:56 +02:00
power
prom
vdso
Kbuild
Kconfig sparc/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:58:31 +02:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile sparc: move the install rule to arch/sparc/Makefile 2021-09-03 08:17:20 +09:00