/linux/lib/tests/ |
H A D | usercopy_kunit.c | 105 /* Test usage of copy_struct_from_user(). */ 133 KUNIT_EXPECT_EQ_MSG(test, copy_struct_from_user(kmem, ksize, umem, usize), 0, in usercopy_test_copy_struct_from_user() 134 "copy_struct_from_user(usize == ksize) failed"); in usercopy_test_copy_struct_from_user() 136 "copy_struct_from_user(usize == ksize) gives unexpected copy"); in usercopy_test_copy_struct_from_user() 146 KUNIT_EXPECT_EQ_MSG(test, copy_struct_from_user(kmem, ksize, umem, usize), 0, in usercopy_test_copy_struct_from_user() 147 "copy_struct_from_user(usize < ksize) failed"); in usercopy_test_copy_struct_from_user() 149 "copy_struct_from_user(usize < ksize) gives unexpected copy"); in usercopy_test_copy_struct_from_user() 156 KUNIT_EXPECT_EQ_MSG(test, copy_struct_from_user(kmem, ksize, umem, usize), -E2BIG, in usercopy_test_copy_struct_from_user() 157 "copy_struct_from_user(usize > ksize) didn't give E2BIG"); in usercopy_test_copy_struct_from_user() 168 KUNIT_EXPECT_EQ_MSG(test, copy_struct_from_user(kme in usercopy_test_copy_struct_from_user() [all...] |
/linux/drivers/platform/surface/ |
H A D | surface_aggregator_cdev.c | 266 ret = copy_struct_from_user(&rqst, sizeof(rqst), r, sizeof(*r)); in ssam_cdev_request() 378 ret = copy_struct_from_user(&desc, sizeof(desc), d, sizeof(*d)); in ssam_cdev_notif_register() 393 ret = copy_struct_from_user(&desc, sizeof(desc), d, sizeof(*d)); in ssam_cdev_notif_unregister() 411 ret = copy_struct_from_user(&desc, sizeof(desc), d, sizeof(*d)); in ssam_cdev_event_enable() 439 ret = copy_struct_from_user(&desc, sizeof(desc), d, sizeof(*d)); in ssam_cdev_event_disable()
|
/linux/drivers/vfio/ |
H A D | device_cdev.c | 102 ret = copy_struct_from_user(&bind, minsz, arg, user_size); in vfio_df_ioctl_bind_iommufd()
|
/linux/security/landlock/ |
H A D | syscalls.c | 55 * Extend copy_struct_from_user() to check for consistent user buffer. 82 return copy_struct_from_user(dst, ksize, src, usize); in copy_min_struct_from_user()
|
/linux/include/linux/ |
H A D | uaccess.h | 337 * copy_struct_from_user: copy a struct from userspace 363 * err = copy_struct_from_user(&karg, sizeof(karg), uarg, usize); 384 copy_struct_from_user(void *dst, size_t ksize, const void __user *src, in copy_struct_from_user() function
|
/linux/drivers/platform/x86/amd/hsmp/ |
H A D | hsmp.c | 301 if (copy_struct_from_user(&msg, sizeof(msg), arguser, sizeof(struct hsmp_message))) in hsmp_ioctl()
|
/linux/drivers/fwctl/ |
H A D | main.c | 196 ret = copy_struct_from_user(ucmd.cmd, op->size, ucmd.ubuffer, in fwctl_fops_ioctl()
|
/linux/drivers/gpu/drm/imagination/ |
H A D | pvr_drv.c | 1169 return copy_struct_from_user(out, obj_size, u64_to_user_ptr(usr_ptr), usr_stride); in pvr_get_uobj() 1214 ret = copy_struct_from_user(out_ptr, obj_size, in_ptr, in->stride); in pvr_get_uobj_array()
|
/linux/Documentation/dev-tools/ |
H A D | checkuapi.rst | 419 ``copy_struct_from_user()`` to safely copy the value:: 427 ret = copy_struct_from_user(&my_cmd, arg, sizeof(struct foo), _IOC_SIZE(cmd)); 430 ``copy_struct_from_user`` will zero the struct in the kernel and then copy
|
/linux/io_uring/ |
H A D | openclose.c | 109 ret = copy_struct_from_user(&open->how, sizeof(open->how), how, len); in io_openat2_prep()
|
/linux/fs/ |
H A D | file_attr.c | 463 error = copy_struct_from_user(&fattr, sizeof(struct file_attr), ufattr, in SYSCALL_DEFINE5()
|
H A D | xattr.c | 734 error = copy_struct_from_user(&args, sizeof(args), uargs, usize); in SYSCALL_DEFINE6() 877 error = copy_struct_from_user(&args, sizeof(args), uargs, usize); in SYSCALL_DEFINE6()
|
H A D | namespace.c | 5102 ret = copy_struct_from_user(&attr, sizeof(attr), uattr, usize); in wants_mount_setattr() 5864 ret = copy_struct_from_user(kreq, sizeof(*kreq), req, usize); in copy_mnt_id_req()
|
/linux/drivers/iommu/iommufd/ |
H A D | main.c | 504 ret = copy_struct_from_user(ucmd.cmd, op->size, ucmd.ubuffer, in iommufd_fops_ioctl()
|
/linux/kernel/sched/ |
H A D | syscalls.c | 907 ret = copy_struct_from_user(attr, sizeof(*attr), uattr, size); in sched_copy_attr()
|
/linux/kernel/trace/ |
H A D | trace_events_user.c | 2415 ret = copy_struct_from_user(kreg, sizeof(*kreg), ureg, size); in user_reg_get() 2577 ret = copy_struct_from_user(kreg, sizeof(*kreg), ureg, size); in user_unreg_get()
|
/linux/drivers/gpu/drm/panthor/ |
H A D | panthor_drv.c | 119 ret = copy_struct_from_user(out_ptr, obj_size, in_ptr, in->stride); in panthor_get_uobj_array()
|
/linux/kernel/ |
H A D | seccomp.c | 1711 ret = copy_struct_from_user(&addfd, sizeof(addfd), uaddfd, size); in seccomp_notify_addfd()
|
H A D | fork.c | 2773 err = copy_struct_from_user(&args, sizeof(args), uargs, usize); in copy_clone_args_from_user()
|
/linux/fs/proc/ |
H A D | task_mmu.c | 600 err = copy_struct_from_user(&karg, sizeof(karg), uarg, usize); in do_procmap_query()
|