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] [day] [month] [year] [list]
Date:   Tue, 13 Feb 2018 19:33:14 +0100
From:   Joerg Roedel <joro@...tes.org>
To:     Suravee Suthikulpanit <suravee.suthikulpanit@....com>
Cc:     iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
        jroedel@...e.de, alex.williamson@...hat.com
Subject: Re: [PATCH] iommu: Do not return error code for APIs with size_t
 return type

On Mon, Feb 05, 2018 at 05:45:53AM -0500, Suravee Suthikulpanit wrote:
> Currently, iommu_unmap, iommu_unmap_fast and iommu_map_sg return
> size_t.  However, some of the return values are error codes (< 0),
> which can be misinterpreted as large size. Therefore, returning size 0
> instead to signify failure to map/unmap.
> 
> Cc: Joerg Roedel <joro@...tes.org>
> Cc: Alex Williamson <alex.williamson@...hat.com>
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@....com>
> ---
> 
> Note: This issue was previously discussed here (https://lkml.org/lkml/2018/1/30/873).
> 
>  drivers/iommu/amd_iommu.c |  2 +-
>  drivers/iommu/iommu.c     |  6 +++---
>  include/linux/iommu.h     | 14 +++++++-------
>  3 files changed, 11 insertions(+), 11 deletions(-)

Yeah, I am not happy with this, but the alternatives aren't any
better... So I applied this one. Thanks!


	Joerg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ