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: <b723611a-d5d5-e4e6-9ca4-eb294763a083@arm.com>
Date:   Thu, 21 Sep 2017 12:08:00 +0100
From:   Jean-Philippe Brucker <jean-philippe.brucker@....com>
To:     Robin Murphy <robin.murphy@....com>,
        "joro@...tes.org" <joro@...tes.org>
Cc:     "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] iommu/of: Remove PCI host bridge node check

On 21/09/17 11:20, Robin Murphy wrote:
> of_pci_iommu_init() tries to be clever and stop its alias walk at the
> device represented by master_np, in case of weird PCI topologies where
> the bridge to the IOMMU and the rest of the system is not at the root.
> It turns out this is a bit short-sighted, since there are plenty of
> other callers of pci_for_each_dma_alias() which would also need the same
> behaviour in that situation, and the only platform so far with such a
> topology (Cavium ThunderX2) already solves it more generally via a PCI
> quirk. As this check is effectively redundant, and returning a boolean
> value as an int is a bit broken anyway, let's just get rid of it.
> 
> Reported-by: Jean-Philippe Brucker <jean-philippe.brucker@....com>

This fixes the 4.14-rc1 issue I had with PCI probing on the FastModel

Tested-by: Jean-Philippe Brucker <jean-philippe.brucker@....com>

> Signed-off-by: Robin Murphy <robin.murphy@....com>
> ---
> 
> Ugh, I'm really failing to spot the obvious today...
> 
>  drivers/iommu/of_iommu.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
> index e60e3dba85a0..50947ebb6d17 100644
> --- a/drivers/iommu/of_iommu.c
> +++ b/drivers/iommu/of_iommu.c
> @@ -157,10 +157,7 @@ static int of_pci_iommu_init(struct pci_dev *pdev, u16 alias, void *data)
>  
>  	err = of_iommu_xlate(info->dev, &iommu_spec);
>  	of_node_put(iommu_spec.np);
> -	if (err)
> -		return err;
> -
> -	return info->np == pdev->bus->dev.of_node;
> +	return err;
>  }
>  
>  const struct iommu_ops *of_iommu_configure(struct device *dev,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ