linux-yocto/arch
Michael Karcher ccdbebbde4 sparc: fix accurate exception reporting in copy_{from,to}_user for M7
[ Upstream commit 936fb51275 ]

The referenced commit introduced exception handlers on user-space memory
references in copy_from_user and copy_to_user. These handlers return from
the respective function and calculate the remaining bytes left to copy
using the current register contents. This commit fixes a couple of bad
calculations. This will fix the return value of copy_from_user and
copy_to_user in the faulting case. The behaviour of memcpy stays unchanged.

Fixes: 34060b8fff ("arch/sparc: Add accurate exception reporting in M7memcpy")
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> # on Oracle SPARC S7
Tested-by: Tony Rodriguez <unixpro1970@gmail.com> # S7, see https://lore.kernel.org/r/98564e2e68df2dda0e00c67a75c7f7dfedb33c7e.camel@physik.fu-berlin.de
Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/20250905-memcpy_series-v4-5-1ca72dda195b@mkarcher.dialup.fu-berlin.de
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-15 12:04:03 +02:00
..
alpha arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
arc arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
arm ARM: dts: omap: am335x-cm-t335: Remove unused mcasp num-serializer property 2025-10-15 12:03:25 +02:00
arm64 arm64: dts: apple: Add ethernet0 alias for J375 template 2025-10-15 12:03:35 +02:00
csky arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
hexagon arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
loongarch arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
m68k arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
microblaze arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
mips arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
nios2 arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
openrisc arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
parisc arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
powerpc sched/fair: Get rid of sched_domains_curr_level hack for tl->cpumask() 2025-10-15 12:03:17 +02:00
riscv RISC-V: KVM: Write hgatp register with valid mode bits 2025-10-15 12:03:59 +02:00
s390 s390/bpf: Write back tail call counter for BPF_TRAMP_F_CALL_ORIG 2025-10-15 12:03:20 +02:00
sh arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
sparc sparc: fix accurate exception reporting in copy_{from,to}_user for M7 2025-10-15 12:04:03 +02:00
um arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
x86 sched/fair: Get rid of sched_domains_curr_level hack for tl->cpumask() 2025-10-15 12:03:17 +02:00
xtensa arch: copy_thread: pass clone_flags as u64 2025-10-15 12:03:13 +02:00
.gitignore
Kconfig Deferred unwind changes for 6.17 2025-08-01 09:46:24 -07:00