• Home
  • Raw
  • Download

Lines Matching +full:1 +full:- +full:9 +full:a +full:- +full:f

1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
25 * copy a null terminated string from userspace.
33 " bf 4f \n" \
34 "1: cmpnei %1, 0 \n" \
35 " bf 5f \n" \
39 " bf 3f \n" \
40 " addi %3, 1 \n" \
41 " addi %2, 1 \n" \
42 " subi %1, 1 \n" \
43 " br 1b \n" \
44 "3: subu %0, %1 \n" \
45 " br 5f \n" \
47 " br 5f \n" \
48 ".section __ex_table, \"a\" \n" \
55 : "5"(-EFAULT), "0"(count), "1"(count), \
61 * __strncpy_from_user: - Copy a NUL terminated string from userspace,
68 * Copies a NUL-terminated string from userspace to kernel space.
75 * If access to userspace fails, returns -EFAULT (some data may have been
91 * strncpy_from_user: - Copy a NUL terminated string from userspace.
97 * Copies a NUL-terminated string from userspace to kernel space.
102 * If access to userspace fails, returns -EFAULT (some data may have been
110 long res = -EFAULT; in strncpy_from_user()
112 if (access_ok(src, 1)) in strncpy_from_user()
119 * strlen_user: - Get the size of a string in user space.
123 * Get the size of a NUL-terminated string in user space.
127 * If the string is too long, returns a value greater than @n.
137 " cmpnei %1, 0 \n" in strnlen_user()
138 " bf 3f \n" in strnlen_user()
139 "1: cmpnei %0, 0 \n" in strnlen_user()
140 " bf 3f \n" in strnlen_user()
141 "2: ldb %3, (%1, 0) \n" in strnlen_user()
143 " bf 3f \n" in strnlen_user()
144 " subi %0, 1 \n" in strnlen_user()
145 " addi %1, 1 \n" in strnlen_user()
146 " br 1b \n" in strnlen_user()
148 " addi %2, 1 \n" in strnlen_user()
149 " br 5f \n" in strnlen_user()
151 " br 5f \n" in strnlen_user()
152 ".section __ex_table, \"a\" \n" in strnlen_user()
158 : "0"(n), "1"(s), "2"(n) in strnlen_user()
170 "0: cmpnei %1, 0 \n" \
171 " bf 7f \n" \
172 " mov %3, %1 \n" \
175 " bf 1f \n" \
176 " br 5f \n" \
177 "1: cmplti %0, 32 \n" /* 4W */ \
178 " bt 3f \n" \
179 "8: stw %2, (%1, 0) \n" \
180 "10: stw %2, (%1, 4) \n" \
181 "11: stw %2, (%1, 8) \n" \
182 "12: stw %2, (%1, 12) \n" \
183 "13: stw %2, (%1, 16) \n" \
184 "14: stw %2, (%1, 20) \n" \
185 "15: stw %2, (%1, 24) \n" \
186 "16: stw %2, (%1, 28) \n" \
187 " addi %1, 32 \n" \
189 " br 1b \n" \
190 "3: cmplti %0, 4 \n" /* 1W */ \
191 " bt 5f \n" \
192 "4: stw %2, (%1, 0) \n" \
193 " addi %1, 4 \n" \
196 "5: cmpnei %0, 0 \n" /* 1B */ \
197 "9: bf 7f \n" \
198 "6: stb %2, (%1, 0) \n" \
199 " addi %1, 1 \n" \
200 " subi %0, 1 \n" \
202 ".section __ex_table,\"a\" \n" \
204 ".long 8b, 9b \n" \
205 ".long 10b, 9b \n" \
206 ".long 11b, 9b \n" \
207 ".long 12b, 9b \n" \
208 ".long 13b, 9b \n" \
209 ".long 14b, 9b \n" \
210 ".long 15b, 9b \n" \
211 ".long 16b, 9b \n" \
212 ".long 4b, 9b \n" \
213 ".long 6b, 9b \n" \
218 : "0"(size), "1"(addr), "2"(0) \
223 * clear_user: - Zero a block of memory in user space.
227 * Zero a block of memory in user space.
242 * __clear_user: - Zero a block of memory in user space, with less checking.
246 * Zero a block of memory in user space. Caller must check