/drivers/vfio/ |
D | vfio_spapr_eeh.c | 36 unsigned long minsz; in vfio_spapr_iommu_eeh_ioctl() local 51 minsz = offsetofend(struct vfio_eeh_pe_op, op); in vfio_spapr_iommu_eeh_ioctl() 52 if (copy_from_user(&op, (void __user *)arg, minsz)) in vfio_spapr_iommu_eeh_ioctl() 54 if (op.argsz < minsz || op.flags) in vfio_spapr_iommu_eeh_ioctl() 86 minsz = offsetofend(struct vfio_eeh_pe_op, err.mask); in vfio_spapr_iommu_eeh_ioctl() 87 if (op.argsz < minsz) in vfio_spapr_iommu_eeh_ioctl() 89 if (copy_from_user(&op, (void __user *)arg, minsz)) in vfio_spapr_iommu_eeh_ioctl()
|
D | vfio_iommu_spapr_tce.c | 780 unsigned long minsz, ddwsz; in tce_iommu_ioctl() local 822 minsz = offsetofend(struct vfio_iommu_spapr_tce_info, in tce_iommu_ioctl() 825 if (copy_from_user(&info, (void __user *)arg, minsz)) in tce_iommu_ioctl() 828 if (info.argsz < minsz) in tce_iommu_ioctl() 848 minsz = ddwsz; in tce_iommu_ioctl() 850 if (copy_to_user((void __user *)arg, &info, minsz)) in tce_iommu_ioctl() 864 minsz = offsetofend(struct vfio_iommu_type1_dma_map, size); in tce_iommu_ioctl() 866 if (copy_from_user(¶m, (void __user *)arg, minsz)) in tce_iommu_ioctl() 869 if (param.argsz < minsz) in tce_iommu_ioctl() 930 minsz = offsetofend(struct vfio_iommu_type1_dma_unmap, in tce_iommu_ioctl() [all …]
|
D | vfio_iommu_type1.c | 2218 unsigned long minsz; in vfio_iommu_type1_ioctl() local 2239 minsz = offsetofend(struct vfio_iommu_type1_info, iova_pgsizes); in vfio_iommu_type1_ioctl() 2244 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_iommu_type1_ioctl() 2247 if (info.argsz < minsz) in vfio_iommu_type1_ioctl() 2251 minsz = capsz; in vfio_iommu_type1_ioctl() 2282 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_iommu_type1_ioctl() 2290 minsz = offsetofend(struct vfio_iommu_type1_dma_map, size); in vfio_iommu_type1_ioctl() 2292 if (copy_from_user(&map, (void __user *)arg, minsz)) in vfio_iommu_type1_ioctl() 2295 if (map.argsz < minsz || map.flags & ~mask) in vfio_iommu_type1_ioctl() 2304 minsz = offsetofend(struct vfio_iommu_type1_dma_unmap, size); in vfio_iommu_type1_ioctl() [all …]
|
D | vfio.c | 1502 unsigned long minsz; in vfio_group_fops_unl_ioctl() local 1504 minsz = offsetofend(struct vfio_group_status, flags); in vfio_group_fops_unl_ioctl() 1506 if (copy_from_user(&status, (void __user *)arg, minsz)) in vfio_group_fops_unl_ioctl() 1509 if (status.argsz < minsz) in vfio_group_fops_unl_ioctl() 1520 if (copy_to_user((void __user *)arg, &status, minsz)) in vfio_group_fops_unl_ioctl() 1857 unsigned long minsz; in vfio_set_irqs_validate_and_prepare() local 1860 minsz = offsetofend(struct vfio_irq_set, count); in vfio_set_irqs_validate_and_prepare() 1862 if ((hdr->argsz < minsz) || (hdr->index >= max_irq_type) || in vfio_set_irqs_validate_and_prepare() 1889 if (hdr->argsz - minsz < hdr->count * size) in vfio_set_irqs_validate_and_prepare()
|
/drivers/s390/cio/ |
D | vfio_ccw_ops.c | 490 unsigned long minsz; in vfio_ccw_mdev_ioctl() local 497 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_ccw_mdev_ioctl() 499 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ccw_mdev_ioctl() 502 if (info.argsz < minsz) in vfio_ccw_mdev_ioctl() 509 return copy_to_user((void __user *)arg, &info, minsz); in vfio_ccw_mdev_ioctl() 515 minsz = offsetofend(struct vfio_region_info, offset); in vfio_ccw_mdev_ioctl() 517 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ccw_mdev_ioctl() 520 if (info.argsz < minsz) in vfio_ccw_mdev_ioctl() 527 return copy_to_user((void __user *)arg, &info, minsz); in vfio_ccw_mdev_ioctl() 533 minsz = offsetofend(struct vfio_irq_info, count); in vfio_ccw_mdev_ioctl() [all …]
|
/drivers/vfio/platform/ |
D | vfio_platform_common.c | 301 unsigned long minsz; in vfio_platform_ioctl() local 306 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_platform_ioctl() 308 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_platform_ioctl() 311 if (info.argsz < minsz) in vfio_platform_ioctl() 320 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_platform_ioctl() 326 minsz = offsetofend(struct vfio_region_info, offset); in vfio_platform_ioctl() 328 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_platform_ioctl() 331 if (info.argsz < minsz) in vfio_platform_ioctl() 342 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_platform_ioctl() 348 minsz = offsetofend(struct vfio_irq_info, count); in vfio_platform_ioctl() [all …]
|
/drivers/vfio/pci/ |
D | vfio_pci.c | 695 unsigned long minsz; in vfio_pci_ioctl() local 700 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_pci_ioctl() 702 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_pci_ioctl() 705 if (info.argsz < minsz) in vfio_pci_ioctl() 716 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_pci_ioctl() 725 minsz = offsetofend(struct vfio_region_info, offset); in vfio_pci_ioctl() 727 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_pci_ioctl() 730 if (info.argsz < minsz) in vfio_pci_ioctl() 864 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_pci_ioctl() 870 minsz = offsetofend(struct vfio_irq_info, count); in vfio_pci_ioctl() [all …]
|
/drivers/fpga/ |
D | dfl-afu-main.c | 605 unsigned long minsz; in afu_ioctl_get_info() local 607 minsz = offsetofend(struct dfl_fpga_port_info, num_umsgs); in afu_ioctl_get_info() 609 if (copy_from_user(&info, arg, minsz)) in afu_ioctl_get_info() 612 if (info.argsz < minsz) in afu_ioctl_get_info() 633 unsigned long minsz; in afu_ioctl_get_region_info() local 636 minsz = offsetofend(struct dfl_fpga_port_region_info, offset); in afu_ioctl_get_region_info() 638 if (copy_from_user(&rinfo, arg, minsz)) in afu_ioctl_get_region_info() 641 if (rinfo.argsz < minsz || rinfo.padding) in afu_ioctl_get_region_info() 662 unsigned long minsz; in afu_ioctl_dma_map() local 665 minsz = offsetofend(struct dfl_fpga_port_dma_map, iova); in afu_ioctl_dma_map() [all …]
|
D | dfl-fme-pr.c | 75 unsigned long minsz; in fme_pr() local 81 minsz = offsetofend(struct dfl_fpga_fme_port_pr, buffer_address); in fme_pr() 83 if (copy_from_user(&port_pr, argp, minsz)) in fme_pr() 86 if (port_pr.argsz < minsz || port_pr.flags) in fme_pr()
|
/drivers/gpu/drm/i915/gvt/ |
D | kvmgt.c | 1279 unsigned long minsz; in intel_vgpu_ioctl() local 1286 minsz = offsetofend(struct vfio_device_info, num_irqs); in intel_vgpu_ioctl() 1288 if (copy_from_user(&info, (void __user *)arg, minsz)) in intel_vgpu_ioctl() 1291 if (info.argsz < minsz) in intel_vgpu_ioctl() 1300 return copy_to_user((void __user *)arg, &info, minsz) ? in intel_vgpu_ioctl() 1312 minsz = offsetofend(struct vfio_region_info, offset); in intel_vgpu_ioctl() 1314 if (copy_from_user(&info, (void __user *)arg, minsz)) in intel_vgpu_ioctl() 1317 if (info.argsz < minsz) in intel_vgpu_ioctl() 1452 return copy_to_user((void __user *)arg, &info, minsz) ? in intel_vgpu_ioctl() 1457 minsz = offsetofend(struct vfio_irq_info, count); in intel_vgpu_ioctl() [all …]
|
/drivers/s390/crypto/ |
D | vfio_ap_ops.c | 1243 unsigned long minsz; in vfio_ap_mdev_get_device_info() local 1246 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_ap_mdev_get_device_info() 1248 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ap_mdev_get_device_info() 1251 if (info.argsz < minsz) in vfio_ap_mdev_get_device_info() 1258 return copy_to_user((void __user *)arg, &info, minsz); in vfio_ap_mdev_get_device_info()
|