]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: Fix exception handling in UltraSPARC-III memcpy.
authorDavid S. Miller <davem@davemloft.net>
Fri, 4 Aug 2017 16:47:52 +0000 (09:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Aug 2017 16:47:52 +0000 (09:47 -0700)
commit42580063ac0343196bd212936eaa71b7892e9a6a
tree7c2df177e5d95de4740fcf20c48c8a4415cae6cb
parentecaad1b975481c63c778ba0ff89a7a94fba914d2
sparc64: Fix exception handling in UltraSPARC-III memcpy.

Mikael Pettersson reported that some test programs in the strace-4.18
testsuite cause an OOPS.

After some debugging it turns out that garbage values are returned
when an exception occurs, causing the fixup memset() to be run with
bogus arguments.

The problem is that two of the exception handler stubs write the
successfully copied length into the wrong register.

Fixes: 93b949d3e5e3 ("sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.")
Reported-by: Mikael Pettersson <mikpelinux@gmail.com>
Tested-by: Mikael Pettersson <mikpelinux@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/lib/U3memcpy.S