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.c2900 unsigned long minsz; in vfio_iommu_type1_get_info() local
2905 minsz = offsetofend(struct vfio_iommu_type1_info, iova_pgsizes); in vfio_iommu_type1_get_info()
2910 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_iommu_type1_get_info()
2913 if (info.argsz < minsz) in vfio_iommu_type1_get_info()
2917 minsz = capsz; in vfio_iommu_type1_get_info()
2958 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_iommu_type1_get_info()
2966 unsigned long minsz; in vfio_iommu_type1_map_dma() local
2970 minsz = offsetofend(struct vfio_iommu_type1_dma_map, size); in vfio_iommu_type1_map_dma()
2972 if (copy_from_user(&map, (void __user *)arg, minsz)) in vfio_iommu_type1_map_dma()
2975 if (map.argsz < minsz || map.flags & ~mask) in vfio_iommu_type1_map_dma()
[all …]
Dvfio.c1529 unsigned long minsz; in vfio_group_fops_unl_ioctl() local
1531 minsz = offsetofend(struct vfio_group_status, flags); in vfio_group_fops_unl_ioctl()
1533 if (copy_from_user(&status, (void __user *)arg, minsz)) in vfio_group_fops_unl_ioctl()
1536 if (status.argsz < minsz) in vfio_group_fops_unl_ioctl()
1547 if (copy_to_user((void __user *)arg, &status, minsz)) in vfio_group_fops_unl_ioctl()
1906 unsigned long minsz; in vfio_set_irqs_validate_and_prepare() local
1909 minsz = offsetofend(struct vfio_irq_set, count); in vfio_set_irqs_validate_and_prepare()
1911 if ((hdr->argsz < minsz) || (hdr->index >= max_irq_type) || in vfio_set_irqs_validate_and_prepare()
1938 if (hdr->argsz - minsz < hdr->count * size) in vfio_set_irqs_validate_and_prepare()
/drivers/vfio/fsl-mc/
Dvfio_fsl_mc.c97 unsigned long minsz; in vfio_fsl_mc_ioctl() local
107 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_fsl_mc_ioctl()
109 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_fsl_mc_ioctl()
112 if (info.argsz < minsz) in vfio_fsl_mc_ioctl()
123 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_fsl_mc_ioctl()
130 minsz = offsetofend(struct vfio_region_info, offset); in vfio_fsl_mc_ioctl()
132 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_fsl_mc_ioctl()
135 if (info.argsz < minsz) in vfio_fsl_mc_ioctl()
146 if (copy_to_user((void __user *)arg, &info, minsz)) in vfio_fsl_mc_ioctl()
154 minsz = offsetofend(struct vfio_irq_info, count); in vfio_fsl_mc_ioctl()
[all …]
/drivers/s390/cio/
Dvfio_ccw_ops.c528 unsigned long minsz; in vfio_ccw_mdev_ioctl() local
535 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_ccw_mdev_ioctl()
537 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ccw_mdev_ioctl()
540 if (info.argsz < minsz) in vfio_ccw_mdev_ioctl()
547 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ccw_mdev_ioctl()
553 minsz = offsetofend(struct vfio_region_info, offset); in vfio_ccw_mdev_ioctl()
555 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ccw_mdev_ioctl()
558 if (info.argsz < minsz) in vfio_ccw_mdev_ioctl()
565 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ccw_mdev_ioctl()
571 minsz = offsetofend(struct vfio_irq_info, count); in vfio_ccw_mdev_ioctl()
[all …]
/drivers/vfio/platform/
Dvfio_platform_common.c282 unsigned long minsz; in vfio_platform_ioctl() local
287 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_platform_ioctl()
289 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_platform_ioctl()
292 if (info.argsz < minsz) in vfio_platform_ioctl()
301 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_platform_ioctl()
307 minsz = offsetofend(struct vfio_region_info, offset); in vfio_platform_ioctl()
309 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_platform_ioctl()
312 if (info.argsz < minsz) in vfio_platform_ioctl()
323 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_platform_ioctl()
329 minsz = offsetofend(struct vfio_irq_info, count); in vfio_platform_ioctl()
[all …]
/drivers/vfio/pci/
Dvfio_pci_core.c645 unsigned long minsz; in vfio_pci_core_ioctl() local
653 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_pci_core_ioctl()
658 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_pci_core_ioctl()
661 if (info.argsz < minsz) in vfio_pci_core_ioctl()
665 minsz = capsz; in vfio_pci_core_ioctl()
701 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_pci_core_ioctl()
710 minsz = offsetofend(struct vfio_region_info, offset); in vfio_pci_core_ioctl()
712 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_pci_core_ioctl()
715 if (info.argsz < minsz) in vfio_pci_core_ioctl()
846 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_pci_core_ioctl()
[all …]
/drivers/fpga/
Ddfl-afu-main.c655 unsigned long minsz; in afu_ioctl_get_info() local
657 minsz = offsetofend(struct dfl_fpga_port_info, num_umsgs); in afu_ioctl_get_info()
659 if (copy_from_user(&info, arg, minsz)) in afu_ioctl_get_info()
662 if (info.argsz < minsz) in afu_ioctl_get_info()
683 unsigned long minsz; in afu_ioctl_get_region_info() local
686 minsz = offsetofend(struct dfl_fpga_port_region_info, offset); in afu_ioctl_get_region_info()
688 if (copy_from_user(&rinfo, arg, minsz)) in afu_ioctl_get_region_info()
691 if (rinfo.argsz < minsz || rinfo.padding) in afu_ioctl_get_region_info()
712 unsigned long minsz; in afu_ioctl_dma_map() local
715 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/gpu/drm/i915/gvt/
Dkvmgt.c1446 unsigned long minsz; in intel_vgpu_ioctl() local
1453 minsz = offsetofend(struct vfio_device_info, num_irqs); in intel_vgpu_ioctl()
1455 if (copy_from_user(&info, (void __user *)arg, minsz)) in intel_vgpu_ioctl()
1458 if (info.argsz < minsz) in intel_vgpu_ioctl()
1467 return copy_to_user((void __user *)arg, &info, minsz) ? in intel_vgpu_ioctl()
1479 minsz = offsetofend(struct vfio_region_info, offset); in intel_vgpu_ioctl()
1481 if (copy_from_user(&info, (void __user *)arg, minsz)) in intel_vgpu_ioctl()
1484 if (info.argsz < minsz) in intel_vgpu_ioctl()
1619 return copy_to_user((void __user *)arg, &info, minsz) ? in intel_vgpu_ioctl()
1624 minsz = offsetofend(struct vfio_irq_info, count); in intel_vgpu_ioctl()
[all …]
/drivers/iommu/
Diommu.c2115 u32 minsz; in iommu_uapi_cache_invalidate() local
2125 minsz = offsetof(struct iommu_cache_invalidate_info, granu); in iommu_uapi_cache_invalidate()
2128 if (copy_from_user(&inv_info, uinfo, minsz)) in iommu_uapi_cache_invalidate()
2132 if (inv_info.argsz < minsz) in iommu_uapi_cache_invalidate()
2150 if (copy_from_user((void *)&inv_info + minsz, uinfo + minsz, in iommu_uapi_cache_invalidate()
2151 min_t(u32, inv_info.argsz, sizeof(inv_info)) - minsz)) in iommu_uapi_cache_invalidate()
2192 u32 minsz; in iommu_sva_prepare_bind_data() local
2198 minsz = offsetof(struct iommu_gpasid_bind_data, vendor); in iommu_sva_prepare_bind_data()
2201 if (copy_from_user(data, udata, minsz)) in iommu_sva_prepare_bind_data()
2205 if (data->argsz < minsz) in iommu_sva_prepare_bind_data()
[all …]
/drivers/s390/crypto/
Dvfio_ap_ops.c1328 unsigned long minsz; in vfio_ap_mdev_get_device_info() local
1331 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_ap_mdev_get_device_info()
1333 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ap_mdev_get_device_info()
1336 if (info.argsz < minsz) in vfio_ap_mdev_get_device_info()
1343 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ap_mdev_get_device_info()