patch-2.1.121 linux/arch/arm/lib/uaccess.S
Next file: linux/arch/arm/mm/fault-armo.c
Previous file: linux/arch/arm/lib/testm.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Sun Sep 6 10:44:47 1998
- Orig file:
v2.1.120/linux/arch/arm/lib/uaccess.S
- Orig date:
Wed May 20 19:10:37 1998
diff -u --recursive --new-file v2.1.120/linux/arch/arm/lib/uaccess.S linux/arch/arm/lib/uaccess.S
@@ -312,7 +312,7 @@
b .cfu_dest_aligned
ENTRY(__arch_copy_from_user)
- stmfd sp!, {r2, r4 - r7, lr}
+ stmfd sp!, {r0, r2, r4 - r7, lr}
cmp r2, #4
blt .cfu_not_enough
ands ip, r0, #3
@@ -375,7 +375,8 @@
movs ip, r2
bne .cfu_nowords
.cfu_finished: mov r0, #0
- LOADREGS(fd,sp!,{r2, r4 - r7, pc})
+ add sp, sp, #8
+ LOADREGS(fd,sp!,{r4 - r7, pc})
.cfu_src_not_aligned:
bic r1, r1, #3
@@ -548,7 +549,12 @@
#ifndef TESTING
.section .fixup,"ax"
.align 0
-9001: LOADREGS(fd,sp!, {r0, r4 - r7, pc})
+ /* We took an exception. Zero out the buffer and pretend no
+ data was copied. */
+9001: ldr r0, [sp], #4
+ ldr r1, [sp]
+ bl SYMBOL_NAME(memzero)
+ LOADREGS(fd,sp!, {r0, r4 - r7, pc})
.previous
#endif
@@ -636,7 +642,11 @@
.section .fixup,"ax"
.align 0
-9001: mov r0, #-EFAULT
+9001: mov ip, #0
+1: strb ip, [r0], #1
+ subs r2, r2, #1
+ bpl 1b
+ mov r0, #-EFAULT
LOADREGS(fd, sp!, {pc})
.previous
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov