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: <c79b7937-fde3-9353-a119-d6e0faebcfdf@nvidia.com>
Date:   Thu, 17 Nov 2016 10:19:28 +0530
From:   Kirti Wankhede <kwankhede@...dia.com>
To:     Alex Williamson <alex.williamson@...hat.com>
CC:     <pbonzini@...hat.com>, <kraxel@...hat.com>, <cjia@...dia.com>,
        <qemu-devel@...gnu.org>, <kvm@...r.kernel.org>,
        <kevin.tian@...el.com>, <jike.song@...el.com>,
        <bjsdjshi@...ux.vnet.ibm.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v14 10/22] vfio iommu type1: Add support for mediated
 devices



On 11/17/2016 5:27 AM, Alex Williamson wrote:
> On Thu, 17 Nov 2016 02:16:22 +0530
> Kirti Wankhede <kwankhede@...dia.com> wrote:
>> @@ -931,6 +1344,24 @@ static void vfio_iommu_type1_detach_group(void *iommu_data,
>>  
>>  	mutex_lock(&iommu->lock);
>>  
>> +	if (iommu->external_domain) {
>> +		group = find_iommu_group(iommu->external_domain, iommu_group);
>> +		if (group) {
>> +			list_del(&group->next);
>> +			kfree(group);
>> +
>> +			if (list_empty(&iommu->external_domain->group_list)) {
>> +				vfio_sanity_check_pfn_list(iommu);
>> +
>> +				if (!IS_IOMMU_CAP_DOMAIN_IN_CONTAINER(iommu))
>> +					vfio_iommu_unmap_unpin_all(iommu);
>> +
>> +				kfree(iommu->external_domain);
> 
> I advised in one place that I didn't understand why  we were checking
> iommu->external_domain before walking the pfn_list, but we do have
> several checks still in place for if(iommu->external_domain), so I
> think we better be setting to NULL after we free it.
> 
> I haven't finished my review yet, but if this ends up being the only
> comment and you agree, I can add:
> 
> iommu->external_domain = NULL;
> 
> here on commit.  Thanks,
> 

Thanks Alex.

I'm updating this patch and 11/22 as per your comment here and  on 11/22.

Thanks,
Kirti

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ