Home
last modified time | relevance | path

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

/linux-6.6.21/drivers/vfio/
Ddevice_cdev.c61 unsigned long minsz; in vfio_df_ioctl_bind_iommufd() local
66 minsz = offsetofend(struct vfio_device_bind_iommufd, out_devid); in vfio_df_ioctl_bind_iommufd()
68 if (copy_from_user(&bind, arg, minsz)) in vfio_df_ioctl_bind_iommufd()
71 if (bind.argsz < minsz || bind.flags || bind.iommufd < 0) in vfio_df_ioctl_bind_iommufd()
160 unsigned long minsz; in vfio_df_ioctl_attach_pt() local
163 minsz = offsetofend(struct vfio_device_attach_iommufd_pt, pt_id); in vfio_df_ioctl_attach_pt()
165 if (copy_from_user(&attach, arg, minsz)) in vfio_df_ioctl_attach_pt()
168 if (attach.argsz < minsz || attach.flags) in vfio_df_ioctl_attach_pt()
196 unsigned long minsz; in vfio_df_ioctl_detach_pt() local
198 minsz = offsetofend(struct vfio_device_detach_iommufd_pt, flags); in vfio_df_ioctl_detach_pt()
[all …]
Dvfio_iommu_spapr_tce.c782 unsigned long minsz; in vfio_spapr_ioctl_eeh_pe_op() local
788 minsz = offsetofend(struct vfio_eeh_pe_op, op); in vfio_spapr_ioctl_eeh_pe_op()
789 if (copy_from_user(&op, (void __user *)arg, minsz)) in vfio_spapr_ioctl_eeh_pe_op()
791 if (op.argsz < minsz || op.flags) in vfio_spapr_ioctl_eeh_pe_op()
815 minsz = offsetofend(struct vfio_eeh_pe_op, err.mask); in vfio_spapr_ioctl_eeh_pe_op()
816 if (op.argsz < minsz) in vfio_spapr_ioctl_eeh_pe_op()
818 if (copy_from_user(&op, (void __user *)arg, minsz)) in vfio_spapr_ioctl_eeh_pe_op()
832 unsigned long minsz, ddwsz; in tce_iommu_ioctl() local
872 minsz = offsetofend(struct vfio_iommu_spapr_tce_info, in tce_iommu_ioctl()
875 if (copy_from_user(&info, (void __user *)arg, minsz)) in tce_iommu_ioctl()
[all …]
Dvfio_main.c844 size_t minsz = in vfio_ioctl_device_feature_mig_device_state() local
860 if (copy_from_user(&mig, arg, minsz)) in vfio_ioctl_device_feature_mig_device_state()
994 size_t minsz = in vfio_ioctl_device_feature_logging_start() local
1015 if (copy_from_user(&control, arg, minsz)) in vfio_ioctl_device_feature_logging_start()
1106 size_t minsz = in vfio_ioctl_device_feature_logging_report() local
1123 if (copy_from_user(&report, arg, minsz)) in vfio_ioctl_device_feature_logging_report()
1149 size_t minsz = offsetofend(struct vfio_device_feature, flags); in vfio_ioctl_device_feature() local
1152 if (copy_from_user(&feature, arg, minsz)) in vfio_ioctl_device_feature()
1155 if (feature.argsz < minsz) in vfio_ioctl_device_feature()
1174 feature.argsz - minsz); in vfio_ioctl_device_feature()
[all …]
Dvfio_iommu_type1.c2766 unsigned long minsz; in vfio_iommu_type1_get_info() local
2770 minsz = offsetofend(struct vfio_iommu_type1_info, iova_pgsizes); in vfio_iommu_type1_get_info()
2772 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_iommu_type1_get_info()
2775 if (info.argsz < minsz) in vfio_iommu_type1_get_info()
2778 minsz = min_t(size_t, info.argsz, sizeof(info)); in vfio_iommu_type1_get_info()
2817 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_iommu_type1_get_info()
2825 unsigned long minsz; in vfio_iommu_type1_map_dma() local
2829 minsz = offsetofend(struct vfio_iommu_type1_dma_map, size); in vfio_iommu_type1_map_dma()
2831 if (copy_from_user(&map, (void __user *)arg, minsz)) in vfio_iommu_type1_map_dma()
2834 if (map.argsz < minsz || map.flags & ~mask) in vfio_iommu_type1_map_dma()
[all …]
Dgroup.c349 unsigned long minsz = offsetofend(struct vfio_group_status, flags); in vfio_group_ioctl_get_status() local
352 if (copy_from_user(&status, arg, minsz)) in vfio_group_ioctl_get_status()
355 if (status.argsz < minsz) in vfio_group_ioctl_get_status()
380 if (copy_to_user(arg, &status, minsz)) in vfio_group_ioctl_get_status()
/linux-6.6.21/samples/vfio-mdev/
Dmdpy.c516 unsigned long minsz; in mdpy_ioctl() local
525 minsz = offsetofend(struct vfio_device_info, num_irqs); in mdpy_ioctl()
527 if (copy_from_user(&info, (void __user *)arg, minsz)) in mdpy_ioctl()
530 if (info.argsz < minsz) in mdpy_ioctl()
539 if (copy_to_user((void __user *)arg, &info, minsz)) in mdpy_ioctl()
550 minsz = offsetofend(struct vfio_region_info, offset); in mdpy_ioctl()
552 if (copy_from_user(&info, (void __user *)arg, minsz)) in mdpy_ioctl()
555 if (info.argsz < minsz) in mdpy_ioctl()
563 if (copy_to_user((void __user *)arg, &info, minsz)) in mdpy_ioctl()
573 minsz = offsetofend(struct vfio_irq_info, count); in mdpy_ioctl()
[all …]
Dmtty.c1207 unsigned long minsz; in mtty_ioctl() local
1214 minsz = offsetofend(struct vfio_device_info, num_irqs); in mtty_ioctl()
1216 if (copy_from_user(&info, (void __user *)arg, minsz)) in mtty_ioctl()
1219 if (info.argsz < minsz) in mtty_ioctl()
1228 if (copy_to_user((void __user *)arg, &info, minsz)) in mtty_ioctl()
1239 minsz = offsetofend(struct vfio_region_info, offset); in mtty_ioctl()
1241 if (copy_from_user(&info, (void __user *)arg, minsz)) in mtty_ioctl()
1244 if (info.argsz < minsz) in mtty_ioctl()
1252 if (copy_to_user((void __user *)arg, &info, minsz)) in mtty_ioctl()
1262 minsz = offsetofend(struct vfio_irq_info, count); in mtty_ioctl()
[all …]
Dmbochs.c1191 unsigned long minsz, outsz; in mbochs_ioctl() local
1198 minsz = offsetofend(struct vfio_device_info, num_irqs); in mbochs_ioctl()
1200 if (copy_from_user(&info, (void __user *)arg, minsz)) in mbochs_ioctl()
1203 if (info.argsz < minsz) in mbochs_ioctl()
1210 if (copy_to_user((void __user *)arg, &info, minsz)) in mbochs_ioctl()
1219 minsz = offsetofend(typeof(info), base.offset); in mbochs_ioctl()
1221 if (copy_from_user(&info, (void __user *)arg, minsz)) in mbochs_ioctl()
1225 if (outsz < minsz) in mbochs_ioctl()
1244 minsz = offsetofend(struct vfio_irq_info, count); in mbochs_ioctl()
1246 if (copy_from_user(&info, (void __user *)arg, minsz)) in mbochs_ioctl()
[all …]
/linux-6.6.21/drivers/vfio/fsl-mc/
Dvfio_fsl_mc.c123 unsigned long minsz; in vfio_fsl_mc_ioctl() local
133 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_fsl_mc_ioctl()
135 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_fsl_mc_ioctl()
138 if (info.argsz < minsz) in vfio_fsl_mc_ioctl()
149 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_fsl_mc_ioctl()
156 minsz = offsetofend(struct vfio_region_info, offset); in vfio_fsl_mc_ioctl()
158 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_fsl_mc_ioctl()
161 if (info.argsz < minsz) in vfio_fsl_mc_ioctl()
172 if (copy_to_user((void __user *)arg, &info, minsz)) in vfio_fsl_mc_ioctl()
180 minsz = offsetofend(struct vfio_irq_info, count); in vfio_fsl_mc_ioctl()
[all …]
/linux-6.6.21/drivers/vfio/cdx/
Dmain.c58 unsigned long minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_cdx_ioctl_get_info() local
62 if (copy_from_user(&info, arg, minsz)) in vfio_cdx_ioctl_get_info()
65 if (info.argsz < minsz) in vfio_cdx_ioctl_get_info()
74 return copy_to_user(arg, &info, minsz) ? -EFAULT : 0; in vfio_cdx_ioctl_get_info()
80 unsigned long minsz = offsetofend(struct vfio_region_info, offset); in vfio_cdx_ioctl_get_region_info() local
84 if (copy_from_user(&info, arg, minsz)) in vfio_cdx_ioctl_get_region_info()
87 if (info.argsz < minsz) in vfio_cdx_ioctl_get_region_info()
98 return copy_to_user(arg, &info, minsz) ? -EFAULT : 0; in vfio_cdx_ioctl_get_region_info()
/linux-6.6.21/drivers/iommu/iommufd/
Dvfio_compat.c163 size_t minsz = offsetofend(struct vfio_iommu_type1_dma_map, size); in iommufd_vfio_map_dma() local
170 if (copy_from_user(&map, arg, minsz)) in iommufd_vfio_map_dma()
173 if (map.argsz < minsz || map.flags & ~supported_flags) in iommufd_vfio_map_dma()
200 size_t minsz = offsetofend(struct vfio_iommu_type1_dma_unmap, size); in iommufd_vfio_unmap_dma() local
213 if (copy_from_user(&unmap, arg, minsz)) in iommufd_vfio_unmap_dma()
216 if (unmap.argsz < minsz || unmap.flags & ~supported_flags) in iommufd_vfio_unmap_dma()
248 if (copy_to_user(arg, &unmap, minsz)) in iommufd_vfio_unmap_dma()
449 size_t minsz = offsetofend(struct vfio_iommu_type1_info, iova_pgsizes); in iommufd_vfio_iommu_get_info() local
457 if (copy_from_user(&info, arg, minsz)) in iommufd_vfio_iommu_get_info()
460 if (info.argsz < minsz) in iommufd_vfio_iommu_get_info()
[all …]
/linux-6.6.21/drivers/s390/cio/
Dvfio_ccw_ops.c514 unsigned long minsz; in vfio_ccw_mdev_ioctl() local
521 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_ccw_mdev_ioctl()
523 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ccw_mdev_ioctl()
526 if (info.argsz < minsz) in vfio_ccw_mdev_ioctl()
533 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ccw_mdev_ioctl()
539 minsz = offsetofend(struct vfio_region_info, offset); in vfio_ccw_mdev_ioctl()
541 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ccw_mdev_ioctl()
544 if (info.argsz < minsz) in vfio_ccw_mdev_ioctl()
551 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ccw_mdev_ioctl()
557 minsz = offsetofend(struct vfio_irq_info, count); in vfio_ccw_mdev_ioctl()
[all …]
/linux-6.6.21/drivers/vfio/platform/
Dvfio_platform_common.c281 unsigned long minsz; in vfio_platform_ioctl() local
286 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_platform_ioctl()
288 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_platform_ioctl()
291 if (info.argsz < minsz) in vfio_platform_ioctl()
300 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_platform_ioctl()
306 minsz = offsetofend(struct vfio_region_info, offset); 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()
322 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_platform_ioctl()
328 minsz = offsetofend(struct vfio_irq_info, count); in vfio_platform_ioctl()
[all …]
/linux-6.6.21/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()
/linux-6.6.21/drivers/vfio/pci/
Dvfio_pci_core.c960 unsigned long minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_pci_ioctl_get_info() local
965 if (copy_from_user(&info, arg, minsz)) in vfio_pci_ioctl_get_info()
968 if (info.argsz < minsz) in vfio_pci_ioctl_get_info()
971 minsz = min_t(size_t, info.argsz, sizeof(info)); in vfio_pci_ioctl_get_info()
1011 return copy_to_user(arg, &info, minsz) ? -EFAULT : 0; in vfio_pci_ioctl_get_info()
1017 unsigned long minsz = offsetofend(struct vfio_region_info, offset); in vfio_pci_ioctl_get_region_info() local
1023 if (copy_from_user(&info, arg, minsz)) in vfio_pci_ioctl_get_region_info()
1026 if (info.argsz < minsz) in vfio_pci_ioctl_get_region_info()
1152 return copy_to_user(arg, &info, minsz) ? -EFAULT : 0; in vfio_pci_ioctl_get_region_info()
1158 unsigned long minsz = offsetofend(struct vfio_irq_info, count); in vfio_pci_ioctl_get_irq_info() local
[all …]
/linux-6.6.21/drivers/gpu/drm/i915/gvt/
Dkvmgt.c1139 unsigned long minsz; in intel_vgpu_ioctl() local
1146 minsz = offsetofend(struct vfio_device_info, num_irqs); in intel_vgpu_ioctl()
1148 if (copy_from_user(&info, (void __user *)arg, minsz)) in intel_vgpu_ioctl()
1151 if (info.argsz < minsz) in intel_vgpu_ioctl()
1160 return copy_to_user((void __user *)arg, &info, minsz) ? in intel_vgpu_ioctl()
1172 minsz = offsetofend(struct vfio_region_info, offset); in intel_vgpu_ioctl()
1174 if (copy_from_user(&info, (void __user *)arg, minsz)) in intel_vgpu_ioctl()
1177 if (info.argsz < minsz) in intel_vgpu_ioctl()
1312 return copy_to_user((void __user *)arg, &info, minsz) ? in intel_vgpu_ioctl()
1317 minsz = offsetofend(struct vfio_irq_info, count); in intel_vgpu_ioctl()
[all …]
/linux-6.6.21/drivers/s390/crypto/
Dvfio_ap_ops.c1874 unsigned long minsz; in vfio_ap_mdev_get_device_info() local
1877 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_ap_mdev_get_device_info()
1879 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ap_mdev_get_device_info()
1882 if (info.argsz < minsz) in vfio_ap_mdev_get_device_info()
1889 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ap_mdev_get_device_info()
1894 unsigned long minsz; in vfio_ap_get_irq_info() local
1897 minsz = offsetofend(struct vfio_irq_info, count); in vfio_ap_get_irq_info()
1899 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ap_get_irq_info()
1902 if (info.argsz < minsz || info.index >= VFIO_AP_NUM_IRQS) in vfio_ap_get_irq_info()
1914 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ap_get_irq_info()
[all …]
/linux-6.6.21/drivers/vfio/pci/hisilicon/
Dhisi_acc_vfio_pci.c774 unsigned long minsz; in hisi_acc_vf_precopy_ioctl() local
780 minsz = offsetofend(struct vfio_precopy_info, dirty_bytes); in hisi_acc_vf_precopy_ioctl()
782 if (copy_from_user(&info, (void __user *)arg, minsz)) in hisi_acc_vf_precopy_ioctl()
784 if (info.argsz < minsz) in hisi_acc_vf_precopy_ioctl()
808 ret = copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in hisi_acc_vf_precopy_ioctl()
1274 unsigned long minsz; in hisi_acc_vfio_pci_ioctl() local
1276 minsz = offsetofend(struct vfio_region_info, offset); in hisi_acc_vfio_pci_ioctl()
1278 if (copy_from_user(&info, (void __user *)arg, minsz)) in hisi_acc_vfio_pci_ioctl()
1281 if (info.argsz < minsz) in hisi_acc_vfio_pci_ioctl()
1298 return copy_to_user((void __user *)arg, &info, minsz) ? in hisi_acc_vfio_pci_ioctl()
/linux-6.6.21/include/linux/
Dvfio.h242 size_t minsz) in vfio_check_feature() argument
252 if (argsz < minsz) in vfio_check_feature()
/linux-6.6.21/drivers/vfio/pci/mlx5/
Dmain.c396 unsigned long minsz; in mlx5vf_precopy_ioctl() local
404 minsz = offsetofend(struct vfio_precopy_info, dirty_bytes); in mlx5vf_precopy_ioctl()
406 if (copy_from_user(&info, (void __user *)arg, minsz)) in mlx5vf_precopy_ioctl()
409 if (info.argsz < minsz) in mlx5vf_precopy_ioctl()
477 if (copy_to_user((void __user *)arg, &info, minsz)) in mlx5vf_precopy_ioctl()
/linux-6.6.21/arch/sparc/mm/
Dsrmmu.c150 int offset, minsz = 1 << SRMMU_NOCACHE_BITMAP_SHIFT; in __srmmu_get_nocache() local
153 if (size < minsz) { in __srmmu_get_nocache()
156 size = minsz; in __srmmu_get_nocache()
158 if (size & (minsz - 1)) { in __srmmu_get_nocache()
161 size += minsz - 1; in __srmmu_get_nocache()