Home
last modified time | relevance | path

Searched refs:minsz (Results 1 – 13 of 13) sorted by relevance

/drivers/vfio/
Dvfio_spapr_eeh.c36 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()
Dvfio_iommu_spapr_tce.c780 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(&param, (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 …]
Dvfio_iommu_type1.c2693 unsigned long minsz; in vfio_iommu_type1_get_info() local
2698 minsz = offsetofend(struct vfio_iommu_type1_info, iova_pgsizes); in vfio_iommu_type1_get_info()
2703 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_iommu_type1_get_info()
2706 if (info.argsz < minsz) in vfio_iommu_type1_get_info()
2710 minsz = capsz; in vfio_iommu_type1_get_info()
2751 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_iommu_type1_get_info()
2759 unsigned long minsz; in vfio_iommu_type1_map_dma() local
2762 minsz = offsetofend(struct vfio_iommu_type1_dma_map, size); in vfio_iommu_type1_map_dma()
2764 if (copy_from_user(&map, (void __user *)arg, minsz)) in vfio_iommu_type1_map_dma()
2767 if (map.argsz < minsz || map.flags & ~mask) in vfio_iommu_type1_map_dma()
[all …]
Dvfio.c1467 unsigned long minsz; in vfio_group_fops_unl_ioctl() local
1469 minsz = offsetofend(struct vfio_group_status, flags); in vfio_group_fops_unl_ioctl()
1471 if (copy_from_user(&status, (void __user *)arg, minsz)) in vfio_group_fops_unl_ioctl()
1474 if (status.argsz < minsz) in vfio_group_fops_unl_ioctl()
1485 if (copy_to_user((void __user *)arg, &status, minsz)) in vfio_group_fops_unl_ioctl()
1839 unsigned long minsz; in vfio_set_irqs_validate_and_prepare() local
1842 minsz = offsetofend(struct vfio_irq_set, count); in vfio_set_irqs_validate_and_prepare()
1844 if ((hdr->argsz < minsz) || (hdr->index >= max_irq_type) || in vfio_set_irqs_validate_and_prepare()
1871 if (hdr->argsz - minsz < hdr->count * size) in vfio_set_irqs_validate_and_prepare()
/drivers/s390/cio/
Dvfio_ccw_ops.c521 unsigned long minsz; in vfio_ccw_mdev_ioctl() local
528 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_ccw_mdev_ioctl()
530 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ccw_mdev_ioctl()
533 if (info.argsz < minsz) in vfio_ccw_mdev_ioctl()
540 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ccw_mdev_ioctl()
546 minsz = offsetofend(struct vfio_region_info, offset); in vfio_ccw_mdev_ioctl()
548 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ccw_mdev_ioctl()
551 if (info.argsz < minsz) in vfio_ccw_mdev_ioctl()
558 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ccw_mdev_ioctl()
564 minsz = offsetofend(struct vfio_irq_info, count); in vfio_ccw_mdev_ioctl()
[all …]
/drivers/vfio/fsl-mc/
Dvfio_fsl_mc.c203 unsigned long minsz; in vfio_fsl_mc_ioctl() local
212 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_fsl_mc_ioctl()
214 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_fsl_mc_ioctl()
217 if (info.argsz < minsz) in vfio_fsl_mc_ioctl()
228 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_fsl_mc_ioctl()
235 minsz = offsetofend(struct vfio_region_info, offset); in vfio_fsl_mc_ioctl()
237 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_fsl_mc_ioctl()
240 if (info.argsz < minsz) in vfio_fsl_mc_ioctl()
251 if (copy_to_user((void __user *)arg, &info, minsz)) in vfio_fsl_mc_ioctl()
259 minsz = offsetofend(struct vfio_irq_info, count); in vfio_fsl_mc_ioctl()
[all …]
/drivers/vfio/platform/
Dvfio_platform_common.c299 unsigned long minsz; in vfio_platform_ioctl() local
304 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_platform_ioctl()
306 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_platform_ioctl()
309 if (info.argsz < minsz) in vfio_platform_ioctl()
318 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_platform_ioctl()
324 minsz = offsetofend(struct vfio_region_info, offset); in vfio_platform_ioctl()
326 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_platform_ioctl()
329 if (info.argsz < minsz) in vfio_platform_ioctl()
340 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_platform_ioctl()
346 minsz = offsetofend(struct vfio_irq_info, count); in vfio_platform_ioctl()
[all …]
/drivers/fpga/
Ddfl-afu-main.c642 unsigned long minsz; in afu_ioctl_get_info() local
644 minsz = offsetofend(struct dfl_fpga_port_info, num_umsgs); in afu_ioctl_get_info()
646 if (copy_from_user(&info, arg, minsz)) in afu_ioctl_get_info()
649 if (info.argsz < minsz) in afu_ioctl_get_info()
670 unsigned long minsz; in afu_ioctl_get_region_info() local
673 minsz = offsetofend(struct dfl_fpga_port_region_info, offset); in afu_ioctl_get_region_info()
675 if (copy_from_user(&rinfo, arg, minsz)) in afu_ioctl_get_region_info()
678 if (rinfo.argsz < minsz || rinfo.padding) in afu_ioctl_get_region_info()
699 unsigned long minsz; in afu_ioctl_dma_map() local
702 minsz = offsetofend(struct dfl_fpga_port_dma_map, iova); in afu_ioctl_dma_map()
[all …]
Ddfl-fme-pr.c75 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/vfio/pci/
Dvfio_pci.c804 unsigned long minsz; in vfio_pci_ioctl() local
811 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_pci_ioctl()
816 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_pci_ioctl()
819 if (info.argsz < minsz) in vfio_pci_ioctl()
823 minsz = capsz; in vfio_pci_ioctl()
862 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_pci_ioctl()
871 minsz = offsetofend(struct vfio_region_info, offset); in vfio_pci_ioctl()
873 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_pci_ioctl()
876 if (info.argsz < minsz) in vfio_pci_ioctl()
1007 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_pci_ioctl()
[all …]
/drivers/gpu/drm/i915/gvt/
Dkvmgt.c1350 unsigned long minsz; in intel_vgpu_ioctl() local
1357 minsz = offsetofend(struct vfio_device_info, num_irqs); in intel_vgpu_ioctl()
1359 if (copy_from_user(&info, (void __user *)arg, minsz)) in intel_vgpu_ioctl()
1362 if (info.argsz < minsz) in intel_vgpu_ioctl()
1371 return copy_to_user((void __user *)arg, &info, minsz) ? in intel_vgpu_ioctl()
1383 minsz = offsetofend(struct vfio_region_info, offset); in intel_vgpu_ioctl()
1385 if (copy_from_user(&info, (void __user *)arg, minsz)) in intel_vgpu_ioctl()
1388 if (info.argsz < minsz) in intel_vgpu_ioctl()
1523 return copy_to_user((void __user *)arg, &info, minsz) ? in intel_vgpu_ioctl()
1528 minsz = offsetofend(struct vfio_irq_info, count); in intel_vgpu_ioctl()
[all …]
/drivers/iommu/
Diommu.c2054 u32 minsz; in iommu_uapi_cache_invalidate() local
2064 minsz = offsetof(struct iommu_cache_invalidate_info, granu); in iommu_uapi_cache_invalidate()
2067 if (copy_from_user(&inv_info, uinfo, minsz)) in iommu_uapi_cache_invalidate()
2071 if (inv_info.argsz < minsz) in iommu_uapi_cache_invalidate()
2089 if (copy_from_user((void *)&inv_info + minsz, uinfo + minsz, in iommu_uapi_cache_invalidate()
2090 min_t(u32, inv_info.argsz, sizeof(inv_info)) - minsz)) in iommu_uapi_cache_invalidate()
2131 u32 minsz; in iommu_sva_prepare_bind_data() local
2137 minsz = offsetof(struct iommu_gpasid_bind_data, vendor); in iommu_sva_prepare_bind_data()
2140 if (copy_from_user(data, udata, minsz)) in iommu_sva_prepare_bind_data()
2144 if (data->argsz < minsz) in iommu_sva_prepare_bind_data()
[all …]
/drivers/s390/crypto/
Dvfio_ap_ops.c1267 unsigned long minsz; in vfio_ap_mdev_get_device_info() local
1270 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_ap_mdev_get_device_info()
1272 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ap_mdev_get_device_info()
1275 if (info.argsz < minsz) in vfio_ap_mdev_get_device_info()
1282 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ap_mdev_get_device_info()