Michael Karcher
936fb51275
sparc: fix accurate exception reporting in copy_{from,to}_user for M7
...
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 >
2025-09-19 20:56:36 +02:00
Babu Moger
34060b8fff
arch/sparc: Add accurate exception reporting in M7memcpy
...
Add accurate exception reporting in M7memcpy
Signed-off-by: Babu Moger <babu.moger@oracle.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-08-10 14:59:04 -07:00
Babu Moger
1ab326934f
arch/sparc: Rename exception handlers
...
Rename exception handlers to memcpy_xxx as these
are going to be used by new memcpy routines and these
handlers are not exclusive to NG4memcpy anymore.
Signed-off-by: Babu Moger <babu.moger@oracle.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-08-10 14:56:05 -07:00
Babu Moger
de5c073e38
arch/sparc: Separate the exception handlers from NG4memcpy
...
Separate the exception handlers from NG4memcpy so that it can be
used with new memcpy routines. Make a separate file for all these handlers.
Signed-off-by: Babu Moger <babu.moger@oracle.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-08-10 14:55:35 -07:00