Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30643
b: refs/heads/master
c: 405040a
h: refs/heads/master
i:
  30641: ff14910
  30639: 74872d4
v: v3
  • Loading branch information
Russell King authored and Russell King committed Jun 25, 2006
1 parent d7339d2 commit 2de8c47
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 800d8b5c4b322798414100c253524aaf1bb9cb86
refs/heads/master: 405040a78b33e39edf4180fc993b9608f07d3c41
5 changes: 2 additions & 3 deletions trunk/arch/arm/lib/strncpy_from_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* -EFAULT on exception, or "len" if we fill the whole buffer
*/
ENTRY(__arch_strncpy_from_user)
save_lr
mov ip, r1
1: subs r2, r2, #1
USER( ldrplbt r3, [r1], #1)
Expand All @@ -31,13 +30,13 @@ USER( ldrplbt r3, [r1], #1)
bne 1b
sub r1, r1, #1 @ take NUL character out of count
2: sub r0, r1, ip
restore_pc
mov pc, lr

.section .fixup,"ax"
.align 0
9001: mov r3, #0
strb r3, [r0, #0] @ null terminate
mov r0, #-EFAULT
restore_pc
mov pc, lr
.previous

5 changes: 2 additions & 3 deletions trunk/arch/arm/lib/strnlen_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* or zero on exception, or n + 1 if too long
*/
ENTRY(__arch_strnlen_user)
save_lr
mov r2, r0
1:
USER( ldrbt r3, [r0], #1)
Expand All @@ -31,10 +30,10 @@ USER( ldrbt r3, [r0], #1)
bne 1b
add r0, r0, #1
2: sub r0, r0, r2
restore_pc
mov pc, lr

.section .fixup,"ax"
.align 0
9001: mov r0, #0
restore_pc
mov pc, lr
.previous
12 changes: 0 additions & 12 deletions trunk/include/asm-arm/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,6 @@
msr cpsr_c, \oldcpsr
.endm

/*
* These two are used to save LR/restore PC over a user-based access.
* The old 26-bit architecture requires that we do. On 32-bit
* architecture, we can safely ignore this requirement.
*/
.macro save_lr
.endm

.macro restore_pc
mov pc, lr
.endm

#define USER(x...) \
9999: x; \
.section __ex_table,"a"; \
Expand Down

0 comments on commit 2de8c47

Please sign in to comment.