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: <20160108121855.GU18805@8bytes.org>
Date:	Fri, 8 Jan 2016 13:18:56 +0100
From:	Joerg Roedel <joro@...tes.org>
To:	Wan ZongShun <mcuos.com@...il.com>
Cc:	Wan Zongshun <vincent.wan@....com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	iommu@...ts.linux-foundation.org, Ray Huang <ray.huang@....com>,
	Borislav Petkov <bp@...e.de>, ken.xue@....com, vw@...mu.org
Subject: Re: [PATCH 5/6] iommu/amd: Add support for non-pci devices

On Fri, Jan 08, 2016 at 11:15:37AM +0800, Wan ZongShun wrote:
> Please see the following function, since I judge this
> 'get_acpihid_device_id(dev, NULL) < 0'  in the front of
> 'get_device_id', so your concern should not exist. I have already
> filtered the negative situation in check_device firstly, do you think
> it is ok?
> 
> 
> static bool check_device(struct device *dev)
> {
>         u16 devid;
> ......
> 
>         /* No PCI device */
>         if (!dev_is_pci(dev) && (get_acpihid_device_id(dev, NULL) < 0))
>                 return false;
> 
>         devid = get_device_id(dev);

That is true for this case, but the other call-sites of get_device_id()
still have to care about a potential negative return value, right?



	Joerg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ