lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 6 Dec 2023 14:19:51 -0400
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Yi Liu <yi.l.liu@...el.com>
Cc:     joro@...tes.org, alex.williamson@...hat.com, kevin.tian@...el.com,
        robin.murphy@....com, baolu.lu@...ux.intel.com, cohuck@...hat.com,
        eric.auger@...hat.com, nicolinc@...dia.com, kvm@...r.kernel.org,
        mjrosato@...ux.ibm.com, chao.p.peng@...ux.intel.com,
        yi.y.sun@...ux.intel.com, peterx@...hat.com, jasowang@...hat.com,
        shameerali.kolothum.thodi@...wei.com, lulu@...hat.com,
        suravee.suthikulpanit@....com, iommu@...ts.linux.dev,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        zhenzhong.duan@...el.com, joao.m.martins@...cle.com,
        xin.zeng@...el.com, yan.y.zhao@...el.com
Subject: Re: [PATCH v6 6/6] iommufd/selftest: Add coverage for
 IOMMU_HWPT_INVALIDATE ioctl

On Fri, Nov 17, 2023 at 05:07:17AM -0800, Yi Liu wrote:
> From: Nicolin Chen <nicolinc@...dia.com>
> 
> Add test cases for the IOMMU_HWPT_INVALIDATE ioctl and verify it by using
> the new IOMMU_TEST_OP_MD_CHECK_IOTLB.
> 
> Signed-off-by: Nicolin Chen <nicolinc@...dia.com>
> Signed-off-by: Yi Liu <yi.l.liu@...el.com>
> ---
>  tools/testing/selftests/iommu/iommufd.c       | 71 +++++++++++++++++++
>  tools/testing/selftests/iommu/iommufd_utils.h | 39 ++++++++++
>  2 files changed, 110 insertions(+)
> 
> diff --git a/tools/testing/selftests/iommu/iommufd.c b/tools/testing/selftests/iommu/iommufd.c
> index c8763b880a16..2781d5bc6309 100644
> --- a/tools/testing/selftests/iommu/iommufd.c
> +++ b/tools/testing/selftests/iommu/iommufd.c
> @@ -116,6 +116,7 @@ TEST_F(iommufd, cmd_length)
>  	TEST_LENGTH(iommu_destroy, IOMMU_DESTROY, id);
>  	TEST_LENGTH(iommu_hw_info, IOMMU_GET_HW_INFO, __reserved);
>  	TEST_LENGTH(iommu_hwpt_alloc, IOMMU_HWPT_ALLOC, __reserved);
> +	TEST_LENGTH(iommu_hwpt_invalidate, IOMMU_HWPT_INVALIDATE, out_driver_error_code);
>  	TEST_LENGTH(iommu_ioas_alloc, IOMMU_IOAS_ALLOC, out_ioas_id);
>  	TEST_LENGTH(iommu_ioas_iova_ranges, IOMMU_IOAS_IOVA_RANGES,
>  		    out_iova_alignment);
> @@ -271,7 +272,9 @@ TEST_F(iommufd_ioas, alloc_hwpt_nested)
>  	struct iommu_hwpt_selftest data = {
>  		.iotlb = IOMMU_TEST_IOTLB_DEFAULT,
>  	};
> +	struct iommu_hwpt_invalidate_selftest inv_reqs[2] = {0};

Don't use {0}

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ