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: <e30442fb-281f-cc5f-387b-b557ccf11920@intel.com>
Date:   Fri, 13 Oct 2023 21:41:03 +0800
From:   Yi Liu <yi.l.liu@...el.com>
To:     "Tian, Kevin" <kevin.tian@...el.com>,
        "joro@...tes.org" <joro@...tes.org>,
        "alex.williamson@...hat.com" <alex.williamson@...hat.com>,
        "jgg@...dia.com" <jgg@...dia.com>,
        "robin.murphy@....com" <robin.murphy@....com>,
        "baolu.lu@...ux.intel.com" <baolu.lu@...ux.intel.com>
CC:     "cohuck@...hat.com" <cohuck@...hat.com>,
        "eric.auger@...hat.com" <eric.auger@...hat.com>,
        "nicolinc@...dia.com" <nicolinc@...dia.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "mjrosato@...ux.ibm.com" <mjrosato@...ux.ibm.com>,
        "chao.p.peng@...ux.intel.com" <chao.p.peng@...ux.intel.com>,
        "yi.y.sun@...ux.intel.com" <yi.y.sun@...ux.intel.com>,
        "peterx@...hat.com" <peterx@...hat.com>,
        "jasowang@...hat.com" <jasowang@...hat.com>,
        "shameerali.kolothum.thodi@...wei.com" 
        <shameerali.kolothum.thodi@...wei.com>,
        "lulu@...hat.com" <lulu@...hat.com>,
        "suravee.suthikulpanit@....com" <suravee.suthikulpanit@....com>,
        "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
        "Duan, Zhenzhong" <zhenzhong.duan@...el.com>,
        "Martins, Joao" <joao.m.martins@...cle.com>
Subject: Re: [PATCH v5 10/11] iommu/vt-d: Add nested domain allocation

On 2023/9/27 14:56, Tian, Kevin wrote:
>> From: Liu, Yi L <yi.l.liu@...el.com>
>> Sent: Thursday, September 21, 2023 3:55 PM
>>
>>
>> +	if (hwpt_type != IOMMU_HWPT_TYPE_DEFAULT &&
>> +	    hwpt_type != IOMMU_HWPT_TYPE_VTD_S1)
>> +		return ERR_PTR(-EINVAL);
>> +
>> +	if ((hwpt_type == IOMMU_HWPT_TYPE_DEFAULT) == !!parent)
>> +		return ERR_PTR(-EINVAL);
> 
> this is probably too strict. What about intel-iommu driver supports a
> IOMMU_HWPT_TYPE_VTD_S2 later for some tweak w/o nesting?

in that case, this check needs to be updated

> let's make the parent match specific to VTD_S1 type.

ok. how about below?

if ((data_type == IOMMU_HWPT_ALLOC_DATA_VTD_S1) && !parent)

>> +
>> +	if (parent && request_nest_parent)
>> +		return ERR_PTR(-EINVAL);
> 
> this check should be moved to iommufd?
> 

oops, maybe no need, iommufd_hwpt_alloc() has below check.

if (cmd->flags & IOMMU_HWPT_ALLOC_NEST_PARENT &&
     cmd->data_type != IOMMU_HWPT_ALLOC_DATA_NONE)
         return -EINVAL;

-- 
Regards,
Yi Liu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ