1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30#include <linux/linkage.h>
31#include <asm/assembler.h>
32#include <asm/errno.h>
33#include <asm/domain.h>
34
35ENTRY(__put_user_1)
36 check_uaccess r0, 1, r1, ip, __put_user_bad
371: TUSER(strb) r2, [r0]
38 mov r0,
39 ret lr
40ENDPROC(__put_user_1)
41
42ENTRY(__put_user_2)
43 check_uaccess r0, 2, r1, ip, __put_user_bad
44 mov ip, r2, lsr
45#ifdef CONFIG_THUMB2_KERNEL
46#ifndef __ARMEB__
472: TUSER(strb) r2, [r0]
483: TUSER(strb) ip, [r0,
49#else
502: TUSER(strb) ip, [r0]
513: TUSER(strb) r2, [r0,
52#endif
53#else
54#ifndef __ARMEB__
552: TUSER(strb) r2, [r0],
563: TUSER(strb) ip, [r0]
57#else
582: TUSER(strb) ip, [r0],
593: TUSER(strb) r2, [r0]
60#endif
61#endif
62 mov r0,
63 ret lr
64ENDPROC(__put_user_2)
65
66ENTRY(__put_user_4)
67 check_uaccess r0, 4, r1, ip, __put_user_bad
684: TUSER(str) r2, [r0]
69 mov r0,
70 ret lr
71ENDPROC(__put_user_4)
72
73ENTRY(__put_user_8)
74 check_uaccess r0, 8, r1, ip, __put_user_bad
75#ifdef CONFIG_THUMB2_KERNEL
765: TUSER(str) r2, [r0]
776: TUSER(str) r3, [r0,
78#else
795: TUSER(str) r2, [r0],
806: TUSER(str) r3, [r0]
81#endif
82 mov r0,
83 ret lr
84ENDPROC(__put_user_8)
85
86__put_user_bad:
87 mov r0,
88 ret lr
89ENDPROC(__put_user_bad)
90
91.pushsection __ex_table, "a"
92 .long 1b, __put_user_bad
93 .long 2b, __put_user_bad
94 .long 3b, __put_user_bad
95 .long 4b, __put_user_bad
96 .long 5b, __put_user_bad
97 .long 6b, __put_user_bad
98.popsection
99