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: <aafed865c0254934986528b3ce9c4d34ff2fccad.camel@intel.com>
Date:   Fri, 17 Apr 2020 01:14:30 +0000
From:   "Derrick, Jonathan" <jonathan.derrick@...el.com>
To:     "joro@...tes.org" <joro@...tes.org>,
        "drake@...lessm.com" <drake@...lessm.com>
CC:     "heiko@...ech.de" <heiko@...ech.de>,
        "kgene@...nel.org" <kgene@...nel.org>,
        "jonathanh@...dia.com" <jonathanh@...dia.com>,
        "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
        "linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
        "baolu.lu@...ux.intel.com" <baolu.lu@...ux.intel.com>,
        "robin.murphy@....com" <robin.murphy@....com>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>,
        "thierry.reding@...il.com" <thierry.reding@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "dwmw2@...radead.org" <dwmw2@...radead.org>,
        "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "m.szyprowski@...sung.com" <m.szyprowski@...sung.com>,
        "jean-philippe@...aro.org" <jean-philippe@...aro.org>,
        "will@...nel.org" <will@...nel.org>,
        "krzk@...nel.org" <krzk@...nel.org>,
        "linux-samsung-soc@...r.kernel.org" 
        <linux-samsung-soc@...r.kernel.org>,
        "robdclark@...il.com" <robdclark@...il.com>,
        "gerald.schaefer@...ibm.com" <gerald.schaefer@...ibm.com>,
        "linux-rockchip@...ts.infradead.org" 
        <linux-rockchip@...ts.infradead.org>,
        "agross@...nel.org" <agross@...nel.org>,
        "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core
 code

Hi Daniel,

On Fri, 2020-04-17 at 09:03 +0800, Daniel Drake wrote:
> Hi Joerg,
> 
> > Hi,
> > 
> > here is the second version of this patch-set. The first version with
> > some more introductory text can be found here:
> > 
> > 	https://lore.kernel.org/lkml/20200407183742.4344-1-joro@8bytes.org/
> 
> Thanks for the continued improvements in this area!
> 
> I may have spotted a problem with setups like VMD.
> 
> The core PCI bus is set up during early boot.
> Then, for the PCI bus, we reach iommu_bus_init() -> bus_iommu_probe().
> In there, we call probe_iommu_group() -> dev_iommu_get() for each PCI
> device, which allocates dev->iommu in each case. So far so good.
> 
> The problem is that this is the last time that we'll call dev_iommu_get().
> If any PCI bus devices get added after this point, they do not get passed
> to dev_iommu_get().
> 
> So when the vmd module gets loaded later, and creates more PCI devices,
> we end up in iommu_bus_notifier() -> iommu_probe_device()
> -> __iommu_probe_device() which does:
> 
> 	dev->iommu->iommu_dev = iommu_dev;
> 
> dev->iommu-> is a NULL dereference because dev_iommu_get() was never
> called for this new device.
> 
> Daniel
> 

I should have CCed you on this, but it should temporarily resolve that
issue:
https://lists.linuxfoundation.org/pipermail/iommu/2020-April/043253.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ