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: <VI1PR0502MB3008BEC2FB8747DDA40A10FCD12F0@VI1PR0502MB3008.eurprd05.prod.outlook.com>
Date:   Tue, 7 Mar 2017 05:08:58 +0000
From:   Parav Pandit <parav@...lanox.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Bart Van Assche <bart.vanassche@...disk.com>
CC:     Doug Ledford <dledford@...hat.com>,
        Sebastian Ott <sebott@...ux.vnet.ibm.com>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        "Benjamin Herrenschmidt" <benh@...nel.crashing.org>,
        David Woodhouse <dwmw2@...radead.org>,
        "H . Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
        Russell King <linux@...linux.org.uk>
Subject: RE: [PATCH 1/2] device: Stop requiring that struct device is embedded
 in struct pci_dev

Hi Greg,

> -----Original Message-----
> From: Greg Kroah-Hartman [mailto:gregkh@...uxfoundation.org]
> Sent: Monday, March 6, 2017 10:53 PM
> To: Bart Van Assche <bart.vanassche@...disk.com>
> Cc: Doug Ledford <dledford@...hat.com>; Sebastian Ott
> <sebott@...ux.vnet.ibm.com>; Parav Pandit <parav@...lanox.com>; linux-
> rdma@...r.kernel.org; linux-kernel@...r.kernel.org; Bjorn Helgaas
> <bhelgaas@...gle.com>; Benjamin Herrenschmidt
> <benh@...nel.crashing.org>; David Woodhouse <dwmw2@...radead.org>;
> H . Peter Anvin <hpa@...or.com>; Ingo Molnar <mingo@...hat.com>;
> Russell King <linux@...linux.org.uk>
> Subject: Re: [PATCH 1/2] device: Stop requiring that struct device is
> embedded in struct pci_dev
> 
> On Mon, Mar 06, 2017 at 04:35:48PM -0800, Bart Van Assche wrote:
> > The dma mapping operations of several architectures and also of
> > several I/O MMU implementations need to translate a struct device
> > pointer into a struct pci_dev pointer. This translation is performed
> > by to_pci_dev(). That macro assumes that struct device is embedded in
> > struct pci_dev. However, that is not the case for the device structure
> > in struct ib_device.
> 
> Then don't blindly cast it backwards!  Fix that up, an ib device should have
> access to the dma structures that the PCI device it depends on has.
> If not, you need to set that up properly in the IB core, don't mess with the
> driver core for this at all.
> 
I replied with pseudo code in previous reply to Bart to bring back dma_device member in the ib_device.
dma_device member was already present in near past of few weeks.
It should be able to work using it without performance impact and without touching driver core layer like in this patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ