Home
last modified time | relevance | path

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

/Linux-v6.1/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_main.c878 unsigned long minsz = offsetofend(struct vfio_group_status, flags); in vfio_group_ioctl_get_status() local
881 if (copy_from_user(&status, arg, minsz)) in vfio_group_ioctl_get_status()
884 if (status.argsz < minsz) in vfio_group_ioctl_get_status()
902 if (copy_to_user(arg, &status, minsz)) in vfio_group_ioctl_get_status()
1230 size_t minsz = in vfio_ioctl_device_feature_mig_device_state() local
1246 if (copy_from_user(&mig, arg, minsz)) in vfio_ioctl_device_feature_mig_device_state()
1305 size_t minsz = in vfio_ioctl_device_feature_logging_start() local
1326 if (copy_from_user(&control, arg, minsz)) in vfio_ioctl_device_feature_logging_start()
1417 size_t minsz = in vfio_ioctl_device_feature_logging_report() local
1434 if (copy_from_user(&report, arg, minsz)) in vfio_ioctl_device_feature_logging_report()
[all …]
Dvfio_iommu_type1.c2776 unsigned long minsz; in vfio_iommu_type1_get_info() local
2781 minsz = offsetofend(struct vfio_iommu_type1_info, iova_pgsizes); in vfio_iommu_type1_get_info()
2786 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_iommu_type1_get_info()
2789 if (info.argsz < minsz) in vfio_iommu_type1_get_info()
2793 minsz = capsz; in vfio_iommu_type1_get_info()
2834 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_iommu_type1_get_info()
2842 unsigned long minsz; in vfio_iommu_type1_map_dma() local
2846 minsz = offsetofend(struct vfio_iommu_type1_dma_map, size); in vfio_iommu_type1_map_dma()
2848 if (copy_from_user(&map, (void __user *)arg, minsz)) in vfio_iommu_type1_map_dma()
2851 if (map.argsz < minsz || map.flags & ~mask) in vfio_iommu_type1_map_dma()
[all …]
/Linux-v6.1/drivers/s390/cio/
Dvfio_ccw_ops.c473 unsigned long minsz; in vfio_ccw_mdev_ioctl() local
480 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_ccw_mdev_ioctl()
482 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ccw_mdev_ioctl()
485 if (info.argsz < minsz) in vfio_ccw_mdev_ioctl()
492 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ccw_mdev_ioctl()
498 minsz = offsetofend(struct vfio_region_info, offset); in vfio_ccw_mdev_ioctl()
500 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ccw_mdev_ioctl()
503 if (info.argsz < minsz) in vfio_ccw_mdev_ioctl()
510 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ccw_mdev_ioctl()
516 minsz = offsetofend(struct vfio_irq_info, count); in vfio_ccw_mdev_ioctl()
[all …]
/Linux-v6.1/samples/vfio-mdev/
Dmdpy.c517 unsigned long minsz; in mdpy_ioctl() local
526 minsz = offsetofend(struct vfio_device_info, num_irqs); in mdpy_ioctl()
528 if (copy_from_user(&info, (void __user *)arg, minsz)) in mdpy_ioctl()
531 if (info.argsz < minsz) in mdpy_ioctl()
540 if (copy_to_user((void __user *)arg, &info, minsz)) in mdpy_ioctl()
551 minsz = offsetofend(struct vfio_region_info, offset); in mdpy_ioctl()
553 if (copy_from_user(&info, (void __user *)arg, minsz)) in mdpy_ioctl()
556 if (info.argsz < minsz) in mdpy_ioctl()
564 if (copy_to_user((void __user *)arg, &info, minsz)) in mdpy_ioctl()
574 minsz = offsetofend(struct vfio_irq_info, count); in mdpy_ioctl()
[all …]
Dmtty.c1125 unsigned long minsz; in mtty_ioctl() local
1132 minsz = offsetofend(struct vfio_device_info, num_irqs); in mtty_ioctl()
1134 if (copy_from_user(&info, (void __user *)arg, minsz)) in mtty_ioctl()
1137 if (info.argsz < minsz) in mtty_ioctl()
1146 if (copy_to_user((void __user *)arg, &info, minsz)) in mtty_ioctl()
1157 minsz = offsetofend(struct vfio_region_info, offset); in mtty_ioctl()
1159 if (copy_from_user(&info, (void __user *)arg, minsz)) in mtty_ioctl()
1162 if (info.argsz < minsz) in mtty_ioctl()
1170 if (copy_to_user((void __user *)arg, &info, minsz)) in mtty_ioctl()
1180 minsz = offsetofend(struct vfio_irq_info, count); in mtty_ioctl()
[all …]
Dmbochs.c1192 unsigned long minsz, outsz; in mbochs_ioctl() local
1199 minsz = offsetofend(struct vfio_device_info, num_irqs); in mbochs_ioctl()
1201 if (copy_from_user(&info, (void __user *)arg, minsz)) in mbochs_ioctl()
1204 if (info.argsz < minsz) in mbochs_ioctl()
1211 if (copy_to_user((void __user *)arg, &info, minsz)) in mbochs_ioctl()
1220 minsz = offsetofend(typeof(info), base.offset); in mbochs_ioctl()
1222 if (copy_from_user(&info, (void __user *)arg, minsz)) in mbochs_ioctl()
1226 if (outsz < minsz) in mbochs_ioctl()
1245 minsz = offsetofend(struct vfio_irq_info, count); in mbochs_ioctl()
1247 if (copy_from_user(&info, (void __user *)arg, minsz)) in mbochs_ioctl()
[all …]
/Linux-v6.1/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-v6.1/drivers/vfio/platform/
Dvfio_platform_common.c285 unsigned long minsz; in vfio_platform_ioctl() local
290 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_platform_ioctl()
292 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_platform_ioctl()
295 if (info.argsz < minsz) in vfio_platform_ioctl()
304 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_platform_ioctl()
310 minsz = offsetofend(struct vfio_region_info, offset); in vfio_platform_ioctl()
312 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_platform_ioctl()
315 if (info.argsz < minsz) in vfio_platform_ioctl()
326 return copy_to_user((void __user *)arg, &info, minsz) ? in vfio_platform_ioctl()
332 minsz = offsetofend(struct vfio_irq_info, count); in vfio_platform_ioctl()
[all …]
/Linux-v6.1/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-v6.1/drivers/vfio/pci/
Dvfio_pci_core.c880 unsigned long minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_pci_ioctl_get_info() local
889 if (copy_from_user(&info, arg, minsz)) in vfio_pci_ioctl_get_info()
892 if (info.argsz < minsz) in vfio_pci_ioctl_get_info()
896 minsz = capsz; in vfio_pci_ioctl_get_info()
931 return copy_to_user(arg, &info, minsz) ? -EFAULT : 0; in vfio_pci_ioctl_get_info()
937 unsigned long minsz = offsetofend(struct vfio_region_info, offset); in vfio_pci_ioctl_get_region_info() local
943 if (copy_from_user(&info, arg, minsz)) in vfio_pci_ioctl_get_region_info()
946 if (info.argsz < minsz) in vfio_pci_ioctl_get_region_info()
1072 return copy_to_user(arg, &info, minsz) ? -EFAULT : 0; in vfio_pci_ioctl_get_region_info()
1078 unsigned long minsz = offsetofend(struct vfio_irq_info, count); in vfio_pci_ioctl_get_irq_info() local
[all …]
/Linux-v6.1/drivers/gpu/drm/i915/gvt/
Dkvmgt.c1150 unsigned long minsz; in intel_vgpu_ioctl() local
1157 minsz = offsetofend(struct vfio_device_info, num_irqs); in intel_vgpu_ioctl()
1159 if (copy_from_user(&info, (void __user *)arg, minsz)) in intel_vgpu_ioctl()
1162 if (info.argsz < minsz) in intel_vgpu_ioctl()
1171 return copy_to_user((void __user *)arg, &info, minsz) ? in intel_vgpu_ioctl()
1183 minsz = offsetofend(struct vfio_region_info, offset); in intel_vgpu_ioctl()
1185 if (copy_from_user(&info, (void __user *)arg, minsz)) in intel_vgpu_ioctl()
1188 if (info.argsz < minsz) in intel_vgpu_ioctl()
1323 return copy_to_user((void __user *)arg, &info, minsz) ? in intel_vgpu_ioctl()
1328 minsz = offsetofend(struct vfio_irq_info, count); in intel_vgpu_ioctl()
[all …]
/Linux-v6.1/include/linux/
Dvfio.h155 size_t minsz) in vfio_check_feature() argument
165 if (argsz < minsz) in vfio_check_feature()
/Linux-v6.1/drivers/vfio/pci/hisilicon/
Dhisi_acc_vfio_pci.c1148 unsigned long minsz; in hisi_acc_vfio_pci_ioctl() local
1150 minsz = offsetofend(struct vfio_region_info, offset); in hisi_acc_vfio_pci_ioctl()
1152 if (copy_from_user(&info, (void __user *)arg, minsz)) in hisi_acc_vfio_pci_ioctl()
1155 if (info.argsz < minsz) in hisi_acc_vfio_pci_ioctl()
1172 return copy_to_user((void __user *)arg, &info, minsz) ? in hisi_acc_vfio_pci_ioctl()
/Linux-v6.1/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()
/Linux-v6.1/drivers/s390/crypto/
Dvfio_ap_ops.c1687 unsigned long minsz; in vfio_ap_mdev_get_device_info() local
1690 minsz = offsetofend(struct vfio_device_info, num_irqs); in vfio_ap_mdev_get_device_info()
1692 if (copy_from_user(&info, (void __user *)arg, minsz)) in vfio_ap_mdev_get_device_info()
1695 if (info.argsz < minsz) in vfio_ap_mdev_get_device_info()
1702 return copy_to_user((void __user *)arg, &info, minsz) ? -EFAULT : 0; in vfio_ap_mdev_get_device_info()