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, 24 Jan 2018 11:38:04 +0700
From:   Suravee Suthikulpanit <suravee.suthikulpanit@....com>
To:     Alex Williamson <alex.williamson@...hat.com>
Cc:     kvm@...r.kernel.org, iommu@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org, joro@...tes.org, jroedel@...e.de
Subject: Re: [PATCH v3] vfio/type1: Adopt fast IOTLB flush interface when
 unmap IOVAs

Alex/Joerg,

On 1/24/18 5:04 AM, Alex Williamson wrote:
>> +static size_t try_unmap_unpin_fast(struct vfio_domain *domain, dma_addr_t iova,
>> +				   size_t len, phys_addr_t phys,
>> +				   struct list_head *unmapped_regions)
>> +{
>> +	struct vfio_regions *entry;
>> +	size_t unmapped;
>> +
>> +	entry = kzalloc(sizeof(*entry), GFP_KERNEL);
>> +	if (!entry)
>> +		return -ENOMEM;
> size_t is unsigned, so pushing -ENOMEM out though this unsigned
> function and the callee interpreting it as unsigned, means we're going
> to see this as a very large unmap, not an error condition.  Looks like
> the IOMMU API has problems in this space too, ex. iommu_unmap(), Joerg?
> 


I can clean up the APIs to use ssize_t, where it can return errors.

Suravee

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ