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]
Message-ID: <c019a91c-3412-41fc-ae20-d8757d87a83e@intel.com>
Date:   Mon, 11 Dec 2023 19:21:41 +0800
From:   Yi Liu <yi.l.liu@...el.com>
To:     Jason Gunthorpe <jgg@...dia.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 4/6] iommufd/selftest: Add
 mock_domain_cache_invalidate_user support

On 2023/12/7 02:16, Jason Gunthorpe wrote:
> On Fri, Nov 17, 2023 at 05:07:15AM -0800, Yi Liu wrote:
>> +static int
>> +mock_domain_cache_invalidate_user(struct iommu_domain *domain,
>> +				  struct iommu_user_data_array *array,
>> +				  u32 *error_code)
>> +{
>> +	struct mock_iommu_domain_nested *mock_nested =
>> +		container_of(domain, struct mock_iommu_domain_nested, domain);
>> +	struct iommu_hwpt_invalidate_selftest inv;
>> +	int rc = 0;
>> +	int i, j;
>> +
>> +	if (domain->type != IOMMU_DOMAIN_NESTED)
>> +		return -EINVAL;
> 
> The core code already checked this, and it is only present on
> domain_nested_ops so it is checked twice already..

would drop it. thanks.

-- 
Regards,
Yi Liu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ