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: <20170117222747.GA11409@obsidianresearch.com>
Date:   Tue, 17 Jan 2017 15:27:47 -0700
From:   Jason Gunthorpe <jgunthorpe@...idianresearch.com>
To:     Bart Van Assche <Bart.VanAssche@...disk.com>
Cc:     "alex.estrin@...el.com" <alex.estrin@...el.com>,
        "dledford@...hat.com" <dledford@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v2 00/26] IB: Optimize DMA mapping

On Tue, Jan 17, 2017 at 10:00:00PM +0000, Bart Van Assche wrote:
> +	/*
> +	 * qib and hfi1 use two sets of DMA operations:
> +	 * - The DMA operations of the PCIe device for SDMA.
> +	 * - dma_virt_ops for users of the qib and hfi1 drivers.
> +	 * The only purpose of @dma_device is to provide a struct device that
> +	 * provides dma_virt_ops.
> +	 */
> +	struct device dma_device;

Creating a struct device, not calling device_initialize() and then
passing it around it other places is pretty ugly and potentially
dangerous.

Is there some other way?

Can you setup ibdev to be the 'dma device' for the user side?

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ