Lines Matching refs:count
80 long strncpy_from_kernel_nofault(char *dst, const void *unsafe_addr, long count)
84 if (unlikely(count <= 0))
86 if (!copy_from_kernel_nofault_allowed(unsafe_addr, count))
94 } while (dst[-1] && src - unsafe_addr < count);
163 * least @count bytes long.
165 * @count: Maximum number of bytes to copy, including the trailing NUL.
174 * If @count is smaller than the length of the string, copies @count-1 bytes,
175 * sets the last byte of @dst buffer to NUL and returns @count.
178 long count)
182 if (unlikely(count <= 0))
186 ret = strncpy_from_user(dst, unsafe_addr, count);
189 if (ret >= count) {
190 ret = count;
202 * @count: Maximum count (including NUL)
208 * If the string is too long, returns a number larger than @count. User
209 * has to check the return value against "> count".
210 * On exception (or invalid count), returns 0.
215 long strnlen_user_nofault(const void __user *unsafe_addr, long count)
220 ret = strnlen_user(unsafe_addr, count);
226 void __copy_overflow(int size, unsigned long count)
228 WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count);