/linux/drivers/misc/lkdtm/ |
H A D | usercopy.c | 91 if (copy_to_user((void __user *)user_addr, good_stack, in do_usercopy_stack() 98 if (copy_to_user((void __user *)user_addr, bad_stack, in do_usercopy_stack() 165 if (copy_to_user(test_user_addr, test_kern_addr, size / 2)) { in do_usercopy_slab_size() 171 if (copy_to_user(test_user_addr, test_kern_addr, size)) { in do_usercopy_slab_size() 242 if (copy_to_user(user_addr, buf + offset, size)) { in do_usercopy_slab_whitelist() 248 if (copy_to_user(user_addr, buf + offset - 1, size)) { in do_usercopy_slab_whitelist() 325 if (copy_to_user((void __user *)user_addr, test_text, in lkdtm_USERCOPY_KERNEL() 333 if (copy_to_user((void __user *)user_addr, vm_mmap, in lkdtm_USERCOPY_KERNEL() 370 if (copy_to_user((void __user *)uaddr, kaddr, in do_usercopy_page_span() 378 if (copy_to_user((void __user *)uaddr, kaddr, unconst + PAGE_SIZE)) { in do_usercopy_page_span()
|
/linux/drivers/accel/habanalabs/common/ |
H A D | habanalabs_ioctl.c | 47 return copy_to_user(out, &dev_stat, in device_status_info() 117 return copy_to_user(out, &hw_ip, in hw_ip_info() 137 return copy_to_user(out, arr, min(max_size, size)) ? -EFAULT : 0; in hw_events_info() 154 return copy_to_user(out, &events_mask, sizeof(u64)) ? -EFAULT : 0; in events_info() 177 return copy_to_user(out, &dram_usage, in dram_usage_info() 196 return copy_to_user(out, &hw_idle, in hw_idle() 249 if (output && copy_to_user((void __user *) (uintptr_t) args->output_ptr, in debug_coresight() 279 return copy_to_user(out, &device_util, in device_utilization() 297 return copy_to_user(out, &clk_rate, min_t(size_t, max_size, sizeof(clk_rate))) in get_clk_rate() 313 return copy_to_user(out, &reset_count, in get_reset_count() [all …]
|
/linux/drivers/s390/crypto/ |
H A D | pkey_api.c | 108 if (!rc && copy_to_user(ugs, &kgs, sizeof(kgs))) in pkey_ioctl_genseck() 134 if (!rc && copy_to_user(ucs, &kcs, sizeof(kcs))) in pkey_ioctl_clr2seck() 159 if (!rc && copy_to_user(usp, &ksp, sizeof(ksp))) in pkey_ioctl_sec2protk() 206 if (!rc && copy_to_user(ucp, &kcp, sizeof(kcp))) in pkey_ioctl_clr2protk() 245 if (copy_to_user(ufc, &kfc, sizeof(kfc))) in pkey_ioctl_findcard() 267 if (!rc && copy_to_user(usp, &ksp, sizeof(ksp))) in pkey_ioctl_skey2pkey() 296 if (!rc && copy_to_user(uvk, &kvk, sizeof(kvk))) in pkey_ioctl_verifykey() 317 if (!rc && copy_to_user(ugp, &kgp, sizeof(kgp))) in pkey_ioctl_genprotk() 383 if (!rc && copy_to_user(utp, &ktp, sizeof(ktp))) in pkey_ioctl_kblob2protk() 429 if (copy_to_user(kgs.key, kkey, klen)) { in pkey_ioctl_genseck2() [all …]
|
/linux/drivers/media/v4l2-core/ |
H A D | v4l2-compat-ioctl32.c | 88 if (copy_to_user(p32, &w32, sizeof(w32))) in put_v4l2_window32() 194 return copy_to_user(&p32->fmt.pix, &p64->fmt.pix, in put_v4l2_format32() 198 return copy_to_user(&p32->fmt.pix_mp, &p64->fmt.pix_mp, in put_v4l2_format32() 205 return copy_to_user(&p32->fmt.vbi, &p64->fmt.vbi, in put_v4l2_format32() 209 return copy_to_user(&p32->fmt.sliced, &p64->fmt.sliced, in put_v4l2_format32() 213 return copy_to_user(&p32->fmt.sdr, &p64->fmt.sdr, in put_v4l2_format32() 217 return copy_to_user(&p32->fmt.meta, &p64->fmt.meta, in put_v4l2_format32() 227 if (copy_to_user(p32, p64, in put_v4l2_create32() 232 copy_to_user(p32->reserved, p64->reserved, sizeof(p64->reserved))) in put_v4l2_create32() 258 copy_to_user(p32->name, p64->name, sizeof(p32->name)) || in put_v4l2_standard32() [all …]
|
/linux/sound/firewire/motu/ |
H A D | motu-hwdep.c | 54 if (copy_to_user(buf, &event, count)) in hwdep_read() 63 if (copy_to_user(buf, &event, count)) in hwdep_read() 86 if (copy_to_user(buf, &event, sizeof(event.motu_register_dsp_change))) in hwdep_read() 130 if (copy_to_user(arg, &info, sizeof(info))) in hwdep_get_info() 210 err = copy_to_user((void __user *)arg, meter, sizeof(*meter)); in hwdep_ioctl() 232 err = copy_to_user((void __user *)arg, meter, sizeof(*meter)); in hwdep_ioctl() 254 err = copy_to_user((void __user *)arg, param, sizeof(*param)); in hwdep_ioctl()
|
/linux/virt/kvm/ |
H A D | binary_stats.c | 87 if (copy_to_user(dest, src, copylen)) in kvm_stats_read() 107 if (copy_to_user(dest, src, copylen)) in kvm_stats_read() 125 if (copy_to_user(dest, src, copylen)) in kvm_stats_read() 137 if (copy_to_user(dest, src, copylen)) in kvm_stats_read()
|
/linux/net/ethtool/ |
H A D | ioctl.c | 111 if (copy_to_user(useraddr, &cmd, sizeof(cmd))) in ethtool_get_features() 114 if (copy_to_user(useraddr, features, in ethtool_get_features() 258 if (copy_to_user(useraddr, &edata, sizeof(edata))) in ethtool_get_one_feature() 517 if (copy_to_user(to, &link_usettings, sizeof(link_usettings))) in store_link_ksettings_for_user() 553 if (copy_to_user(useraddr, &link_ksettings.base, in ethtool_get_link_ksettings() 677 if (copy_to_user(useraddr, &cmd, sizeof(cmd))) in ethtool_get_settings() 820 if (copy_to_user(useraddr, &info, sizeof(info))) in ethtool_get_sset_info() 824 if (copy_to_user(useraddr, info_buf, array_size(idx, sizeof(u32)))) in ethtool_get_sset_info() 915 if (copy_to_user(useraddr, &crxnfc, min(size, sizeof(crxnfc)))) in ethtool_rxnfc_copy_to_compat() 964 ret = copy_to_user(useraddr, rxnfc, size); in ethtool_rxnfc_copy_to_user() [all …]
|
/linux/drivers/vfio/pci/ |
H A D | vfio_pci_igd.c | 54 if (copy_to_user(dst + (*off), src, bytes)) in igd_opregion_shift_copy() 142 copy_to_user(buf + off, opregionvbt->vbt_ex + (pos - OPREGION_SIZE), in vfio_pci_igd_rw() 303 if (copy_to_user(buf + count - size, &val, 1)) in vfio_pci_igd_cfg_rw() 319 if (copy_to_user(buf + count - size, &lval, 2)) in vfio_pci_igd_cfg_rw() 335 if (copy_to_user(buf + count - size, &lval, 4)) in vfio_pci_igd_cfg_rw() 351 if (copy_to_user(buf + count - size, &lval, 2)) in vfio_pci_igd_cfg_rw() 365 if (copy_to_user(buf + count - size, &val, 1)) in vfio_pci_igd_cfg_rw()
|
/linux/drivers/s390/char/ |
H A D | uvdevice.c | 80 if (copy_to_user(user_buf_arg, &uvdev_info, sizeof(uvdev_info))) in uvio_uvdev_info() 120 if (copy_to_user(user_buf_meas, measurement, uvio_attest->meas_len)) in uvio_copy_attest_result_to_user() 122 if (add_data && copy_to_user(user_buf_add, add_data, uvio_attest->add_data_len)) in uvio_copy_attest_result_to_user() 126 if (copy_to_user(user_buf_uid, uvcb_attest->config_uid, sizeof(uvcb_attest->config_uid))) in uvio_copy_attest_result_to_user() 324 if (copy_to_user(user_buf + user_off, list->secrets, copy_len)) in uvio_get_list() 333 if (copy_to_user(user_buf, list, data_off)) in uvio_get_list() 462 if (copy_to_user((__user void *)uv_ioctl->argument_addr, buf, buf_len)) in uvio_retr_secret() 537 if (copy_to_user(argp, &uv_ioctl, sizeof(uv_ioctl))) in uvio_ioctl()
|
/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_kms.c | 586 return copy_to_user(out, &ui32, min(size, 4u)) ? -EFAULT : 0; in amdgpu_info_ioctl() 602 return copy_to_user(out, &ui32, min(size, 4u)) ? -EFAULT : 0; in amdgpu_info_ioctl() 610 ret = copy_to_user(out, &ip, min_t(size_t, size, sizeof(ip))); in amdgpu_info_ioctl() 653 return copy_to_user(out, &count, min(size, 4u)) ? -EFAULT : 0; in amdgpu_info_ioctl() 681 return copy_to_user(out, &count, min(size, 4u)) ? -EFAULT : 0; in amdgpu_info_ioctl() 685 return copy_to_user(out, &ui64, min(size, 8u)) ? -EFAULT : 0; in amdgpu_info_ioctl() 697 return copy_to_user(out, &fw_info, in amdgpu_info_ioctl() 702 return copy_to_user(out, &ui64, min(size, 8u)) ? -EFAULT : 0; in amdgpu_info_ioctl() 705 return copy_to_user(out, &ui64, min(size, 8u)) ? -EFAULT : 0; in amdgpu_info_ioctl() 708 return copy_to_user(out, &ui64, min(size, 8u)) ? -EFAULT : 0; in amdgpu_info_ioctl() [all …]
|
/linux/drivers/misc/vmw_vmci/ |
H A D | vmci_host.c | 216 *retval = copy_to_user(user_buf_uva, in drv_cp_harray_to_user() 341 if (copy_to_user(uptr, &init_block, sizeof(init_block))) { in vmci_host_do_init_context() 413 return copy_to_user(uptr, &send_info, sizeof(send_info)) ? -EFAULT : 0; in vmci_host_do_send_datagram() 439 retval = copy_to_user(ubuf, dg, VMCI_DG_SIZE(dg)); in vmci_host_do_receive_datagram() 445 return copy_to_user(uptr, &recv_info, sizeof(recv_info)) ? -EFAULT : 0; in vmci_host_do_receive_datagram() 731 retval = copy_to_user(ubuf, cpt_buf, get_info.buf_size); in vmci_host_do_ctx_get_cpt_state() 738 return copy_to_user(uptr, &get_info, sizeof(get_info)) ? -EFAULT : 0; in vmci_host_do_ctx_get_cpt_state() 767 retval = copy_to_user(uptr, &set_info, sizeof(set_info)) ? -EFAULT : 0; in vmci_host_do_ctx_set_cpt_state() 805 return copy_to_user(uptr, ¬ify_info, sizeof(notify_info)) ? in vmci_host_do_set_notify() 856 return copy_to_user(uptr, &info, sizeof(info)) ? -EFAULT : 0; in vmci_host_do_notify_resource() [all …]
|
/linux/drivers/char/ |
H A D | uv_mmtimer.c | 106 if (copy_to_user((unsigned long __user *)arg, in uv_mmtimer_ioctl() 112 if (copy_to_user((unsigned long __user *)arg, in uv_mmtimer_ioctl() 127 if (copy_to_user((unsigned long __user *)arg, in uv_mmtimer_ioctl()
|
H A D | ppdev.c | 185 if (bytes_read > 0 && copy_to_user(buf, kbuffer, bytes_read)) in pp_read() 453 if (copy_to_user(argp, &mode, sizeof(mode))) in pp_do_ioctl() 480 if (copy_to_user(argp, &phase, sizeof(phase))) in pp_do_ioctl() 494 if (copy_to_user(argp, &modes, sizeof(modes))) in pp_do_ioctl() 513 if (copy_to_user(argp, &uflags, sizeof(uflags))) in pp_do_ioctl() 530 if (copy_to_user(argp, ®, sizeof(reg))) in pp_do_ioctl() 535 if (copy_to_user(argp, ®, sizeof(reg))) in pp_do_ioctl() 540 if (copy_to_user(argp, ®, sizeof(reg))) in pp_do_ioctl() 616 if (copy_to_user(argp, &ret, sizeof(ret))) in pp_do_ioctl() 647 if (copy_to_user(argp, time32, sizeof(time32))) in pp_do_ioctl() [all …]
|
/linux/sound/firewire/tascam/ |
H A D | tascam-hwdep.c | 32 if (copy_to_user(buf, &event, count)) in tscm_hwdep_read_locked() 78 if (copy_to_user(pos, &entries[head_pos], length)) in tscm_hwdep_read_queue() 92 if (copy_to_user(buf, &type, sizeof(type))) in tscm_hwdep_read_queue() 160 if (copy_to_user(arg, &info, sizeof(info))) in hwdep_get_info() 204 if (copy_to_user(arg, tscm->state, sizeof(tscm->state))) in tscm_hwdep_state()
|
/linux/fs/xfs/ |
H A D | xfs_ioctl.c | 57 if (copy_to_user(breq->ubuffer, &bs1, sizeof(bs1))) in xfs_fsbulkstat_one_fmt() 70 if (copy_to_user(breq->ubuffer, &ig1, sizeof(struct xfs_inogrp))) in xfs_fsinumbers_fmt() 144 copy_to_user(bulkreq.lastip, &lastino, sizeof(xfs_ino_t))) in xfs_ioc_fsbulkstat() 148 copy_to_user(bulkreq.ocount, &breq.ocount, sizeof(__s32))) in xfs_ioc_fsbulkstat() 160 if (copy_to_user(breq->ubuffer, bstat, sizeof(struct xfs_bulkstat))) in xfs_bulkstat_fmt() 293 if (copy_to_user(&arg->hdr, &hdr, sizeof(hdr))) in xfs_ioc_bulkstat() 304 if (copy_to_user(breq->ubuffer, igrp, sizeof(struct xfs_inumbers))) in xfs_inumbers_fmt() 346 if (copy_to_user(&arg->hdr, &hdr, sizeof(hdr))) in xfs_ioc_inumbers() 372 if (copy_to_user(arg, &fsgeo, len)) in xfs_ioc_fsgeometry() 402 if (copy_to_user(arg, &ageo, sizeof(ageo))) in xfs_ioc_ag_geometry() [all …]
|
/linux/arch/alpha/kernel/ |
H A D | osf_sys.c | 138 copy_to_user(dirent->d_name, name, namlen) || in osf_filldir() 299 return copy_to_user(osf_stat, &tmp, sizeof(tmp)) ? -EFAULT : 0; in linux_to_osf_stat() 320 return copy_to_user(osf_stat, &tmp_stat, bufsiz) ? -EFAULT : 0; in linux_to_osf_statfs() 340 return copy_to_user(osf_stat, &tmp_stat, bufsiz) ? -EFAULT : 0; in linux_to_osf_statfs64() 542 if (copy_to_user(name, tmp, sizeof(tmp))) in SYSCALL_DEFINE1() 576 if (copy_to_user(name, tmp, len)) in SYSCALL_DEFINE2() 756 if (copy_to_user(buf, tmp, len)) in SYSCALL_DEFINE3() 807 if (copy_to_user(buffer, hwrpb, nbytes) != 0) in SYSCALL_DEFINE5() 959 return copy_to_user(o, &(struct timeval32){ in put_tv32() 968 return copy_to_user(o, &(struct timeval32){ in put_tv_to_tv32() [all …]
|
/linux/drivers/input/ |
H A D | input-compat.c | 50 if (copy_to_user(buffer, &compat_event, in input_event_to_user() 55 if (copy_to_user(buffer, event, sizeof(struct input_event))) in input_event_to_user() 111 if (copy_to_user(buffer, event, sizeof(struct input_event))) in input_event_to_user()
|
/linux/drivers/sbus/char/ |
H A D | envctrl.c | 555 if (copy_to_user(buf, data, ret)) in envctrl_read() 565 if (copy_to_user(buf, data, ret)) in envctrl_read() 573 if (copy_to_user(buf, data, ret)) in envctrl_read() 583 if (copy_to_user(buf, data, ret)) in envctrl_read() 593 if (copy_to_user(buf, data, ret)) in envctrl_read() 601 if (copy_to_user(buf, data, ret)) in envctrl_read() 609 if (copy_to_user(buf, data, ret)) in envctrl_read() 618 if (copy_to_user(buf, data, ret)) in envctrl_read() 627 if (copy_to_user(buf, data, ret)) in envctrl_read() 638 if (copy_to_user(buf, data, ret)) in envctrl_read()
|
/linux/net/atm/ |
H A D | resources.c | 185 error = copy_to_user(arg, &tmp, sizeof(tmp)); in fetch_stats() 220 error = ((copy_to_user(buf, tmp_buf, size)) || in atm_getnames() 244 if (copy_to_user(buf, dev->type, size)) { in atm_dev_ioctl() 251 if (copy_to_user(buf, dev->esi, size)) { in atm_dev_ioctl() 297 if (copy_to_user(buf, &dev->ci_range, size)) { in atm_dev_ioctl() 304 if (copy_to_user(buf, &dev->link_rate, size)) { in atm_dev_ioctl()
|
/linux/net/bluetooth/bnep/ |
H A D | sock.c | 85 if (copy_to_user(argp, &ca, sizeof(ca))) in do_bnep_sock_ioctl() 109 if (!err && copy_to_user(argp, &cl, sizeof(cl))) in do_bnep_sock_ioctl() 119 if (!err && copy_to_user(argp, &ci, sizeof(ci))) in do_bnep_sock_ioctl() 125 if (copy_to_user(argp, &supp_feat, sizeof(supp_feat))) in do_bnep_sock_ioctl()
|
/linux/arch/sparc/kernel/ |
H A D | sigutil_64.c | 23 err |= copy_to_user(&fpu->si_float_regs[0], fpregs, in save_fpu_state() 26 err |= copy_to_user(&fpu->si_float_regs[32], fpregs+16, in save_fpu_state() 67 err |= copy_to_user(&rwin->reg_window[i], rp, in save_rwin_state()
|
/linux/kernel/bpf/ |
H A D | mprog.c | 414 if (copy_to_user(&uattr->query.attach_flags, &flags, sizeof(flags))) in bpf_mprog_query() 416 if (copy_to_user(&uattr->query.revision, &revision, sizeof(revision))) in bpf_mprog_query() 418 if (copy_to_user(&uattr->query.count, &count, sizeof(count))) in bpf_mprog_query() 436 if (copy_to_user(uprog_id + i, &id, sizeof(id))) in bpf_mprog_query() 439 copy_to_user(uprog_flags + i, &flags, sizeof(flags))) in bpf_mprog_query() 443 copy_to_user(ulink_id + i, &id, sizeof(id))) in bpf_mprog_query() 446 copy_to_user(ulink_flags + i, &flags, sizeof(flags))) in bpf_mprog_query()
|
/linux/drivers/hid/usbhid/ |
H A D | hiddev.c | 382 if (copy_to_user(buffer + retval, &event, sizeof(struct hiddev_event))) { in hiddev_read() 392 … if (copy_to_user(buffer + retval, list->buffer + list->tail, sizeof(struct hiddev_usage_ref))) { in hiddev_read() 470 if (copy_to_user(user_arg, uref, sizeof(*uref))) in hiddev_ioctl_usage() 525 if (copy_to_user(user_arg, uref, sizeof(*uref))) in hiddev_ioctl_usage() 543 if (copy_to_user(user_arg, uref_multi, in hiddev_ioctl_usage() 584 if (copy_to_user(user_arg+sizeof(int), buf, len+1)) { in hiddev_ioctl_string() 654 r = copy_to_user(user_arg, &dinfo, sizeof(dinfo)) ? in hiddev_ioctl() 744 r = copy_to_user(user_arg, &rinfo, sizeof(rinfo)) ? in hiddev_ioctl() 783 r = copy_to_user(user_arg, &finfo, sizeof(finfo)) ? in hiddev_ioctl() 815 r = copy_to_user(user_arg, &cinfo, sizeof(cinfo)) ? in hiddev_ioctl() [all …]
|
/linux/drivers/gpu/drm/i915/ |
H A D | i915_query.c | 68 if (copy_to_user(u64_to_user_ptr(query_item->data_ptr), in fill_topology_info() 72 if (copy_to_user(u64_to_user_ptr(query_item->data_ptr + sizeof(topo)), in fill_topology_info() 165 if (copy_to_user(info_ptr, &info, sizeof(info))) in query_engine_info() 172 if (copy_to_user(query_ptr, &query, sizeof(query))) in query_engine_info() 340 if (copy_to_user(user_config_ptr, &user_config, sizeof(user_config))) { in query_perf_config_data() 435 ret = copy_to_user(user_query_config_ptr + 1, in query_perf_config_list() 547 if (copy_to_user(u64_to_user_ptr(query_item->data_ptr), in query_hwconfig_blob() 580 if (copy_to_user(query_ptr, &ver, size)) in query_guc_submission_version()
|
/linux/drivers/scsi/ |
H A D | scsi_ioctl.c | 60 if (copy_to_user(buffer, string, len)) in ioctl_probe() 169 return copy_to_user(arg, name, min(strlen(name), (size_t)20)) in scsi_ioctl_get_pci() 230 if (copy_to_user(argp, &v, sizeof(struct scsi_idlun))) in scsi_get_idlun() 397 if (!copy_to_user(hdr->sbp, scmd->sense_buffer, len)) in scsi_complete_sghdr_rq() 599 if (copy_to_user(sic->data, scmd->sense_buffer, in sg_scsi_ioctl() 604 if (copy_to_user(sic->data, buffer, out_len)) in sg_scsi_ioctl() 646 if (copy_to_user(argp, &hdr32, sizeof(hdr32))) in put_sg_io_hdr() 653 if (copy_to_user(argp, hdr, sizeof(*hdr))) in put_sg_io_hdr() 767 if (copy_to_user(arg, &cgc32, sizeof(cgc32))) in scsi_put_cdrom_generic_arg() 773 if (copy_to_user(arg, cgc, sizeof(*cgc))) in scsi_put_cdrom_generic_arg()
|