3030 .endm
3131
3232 .macro ldrh1 reg , ptr , val
33- uao_user_alternative 9998f , ldrh , ldtrh , \reg , \ptr , \val
33+ uao_user_alternative 9997f , ldrh , ldtrh , \reg , \ptr , \val
3434 .endm
3535
3636 .macro strh1 reg , ptr , val
37- uao_user_alternative 9998f , strh , sttrh , \reg , \ptr , \val
37+ uao_user_alternative 9997f , strh , sttrh , \reg , \ptr , \val
3838 .endm
3939
4040 .macro ldr1 reg , ptr , val
41- uao_user_alternative 9998f , ldr , ldtr , \reg , \ptr , \val
41+ uao_user_alternative 9997f , ldr , ldtr , \reg , \ptr , \val
4242 .endm
4343
4444 .macro str1 reg , ptr , val
45- uao_user_alternative 9998f , str , sttr , \reg , \ptr , \val
45+ uao_user_alternative 9997f , str , sttr , \reg , \ptr , \val
4646 .endm
4747
4848 .macro ldp1 reg1 , reg2 , ptr , val
49- uao_ldp 9998f , \reg1 , \reg2 , \ptr , \val
49+ uao_ldp 9997f , \reg1 , \reg2 , \ptr , \val
5050 .endm
5151
5252 .macro stp1 reg1 , reg2 , ptr , val
53- uao_stp 9998f , \reg1 , \reg2 , \ptr , \val
53+ uao_stp 9997f , \reg1 , \reg2 , \ptr , \val
5454 .endm
5555
5656end .req x5
57-
57+ srcin .req x15
5858SYM_FUNC_START(__arch_copy_in_user)
5959 add end , x0 , x2
60+ mov srcin , x1
6061#include "copy_template.S"
6162 mov x0 , # 0
6263 ret
@@ -65,6 +66,12 @@ EXPORT_SYMBOL(__arch_copy_in_user)
6566
6667 . section .fixup , "ax"
6768 . align 2
69+ 9997 : cmp dst , dstin
70+ b.ne 9998f
71+ // Before being absolutely sure we couldn't copy anything , try harder
72+ USER(9998f , ldtrb tmp1w , [ srcin ] )
73+ USER(9998f , sttrb tmp1w , [ dst ] )
74+ add dst , dst , # 1
68759998 : sub x0 , end , dst // bytes not copied
6976 ret
7077 .previous
0 commit comments