Lines Matching defs:ksize
302 * @dst: Destination address, in kernel space. This buffer must be @ksize
304 * @ksize: Size of @dst struct.
314 * @ksize is just sizeof(*dst), and @usize should've been passed by userspace.
335 * * If @usize == @ksize, then it's copied verbatim.
336 * * If @usize < @ksize, then the userspace has passed an old struct to a
337 * newer kernel. The rest of the trailing bytes in @dst (@ksize - @usize)
339 * * If @usize > @ksize, then the userspace has passed a new struct to an
340 * older kernel. The trailing bytes unknown to the kernel (@usize - @ksize)
344 * * -E2BIG: (@usize > @ksize) and there are non-zero trailing bytes in @src.
348 copy_struct_from_user(void *dst, size_t ksize, const void __user *src,
351 size_t size = min(ksize, usize);
352 size_t rest = max(ksize, usize) - size;
354 /* Double check if ksize is larger than a known object size. */
355 if (WARN_ON_ONCE(ksize > __builtin_object_size(dst, 1)))
359 if (usize < ksize) {
361 } else if (usize > ksize) {