patch-2.1.101 linux/arch/sparc64/lib/VIScopy.S

Next file: linux/arch/sparc64/mm/init.c
Previous file: linux/arch/sparc64/kernel/systbls.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.100/linux/arch/sparc64/lib/VIScopy.S linux/arch/sparc64/lib/VIScopy.S
@@ -1,4 +1,4 @@
-/* $Id: VIScopy.S,v 1.14 1997/08/22 15:54:53 jj Exp $
+/* $Id: VIScopy.S,v 1.15 1998/04/26 07:21:54 davem Exp $
  * VIScopy.S: High speed copy operations utilizing the UltraSparc
  *            Visual Instruction Set.
  *
@@ -978,7 +978,16 @@
 VIScopyfixup_reto2:
 		mov		%o2, %o0
 VIScopyfixup_ret:
-		retl
+		/* If this is copy_from_user(), zero out the rest of the
+		 * kernel buffer.
+		 */
+		andcc		asi_src, 0x1, %g0
+		bne		1f
+		 mov		%o0, %o4
+		/* XXX Here, somehow get original kernel pointer (was in %o0)
+		 * XXX and bzero() all remaining bytes in kernel buffer.
+		 */
+1:		retl
 		 wr		%g0, 0, %fprs
 VIScopyfixup1:	subcc		%g2, 18, %g2
 		bgeu,a,pt	%icc, VIScopyfixup1

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov