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  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]
Date:   Mon, 17 Feb 2020 23:20:31 +0530
From:   Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Arnd Bergmann <arnd@...db.de>, smohanad@...eaurora.org,
        Jeffrey Hugo <jhugo@...eaurora.org>,
        Kalle Valo <kvalo@...eaurora.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        hemantk@...eaurora.org,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 02/16] bus: mhi: core: Add support for registering MHI
 controllers

On Mon, Feb 17, 2020 at 05:32:05PM +0100, Greg KH wrote:
> On Mon, Feb 17, 2020 at 05:04:52PM +0100, Arnd Bergmann wrote:
> > On Mon, Feb 17, 2020 at 3:15 PM Greg KH <gregkh@...uxfoundation.org> wrote:
> > > On Mon, Feb 17, 2020 at 06:34:19PM +0530, Manivannan Sadhasivam wrote:
> > > > On Mon, Feb 17, 2020 at 12:59:30PM +0100, Greg KH wrote:
> > > > ```
> > > > struct mhi_device *mhi_alloc_device(struct mhi_controller *mhi_cntrl)
> > > > {
> > > > ...
> > > > dev->parent = mhi_cntrl->dev;
> > > > ...
> > > > ```
> > > >
> > > > Hence, having the parent dev pointer really helps.
> > >
> > > Yes, saving the parent device is fine, but you should be doing your own
> > > dma calls using _your_ device, not the parents.  Only mess with the
> > > parent pointer if you need to do something "normal" for a parent.
> > 
> > The MHI device is not involved in DMA at all, as it is not a DMA master,
> > and has no knowledge of the memory management or whether there
> > is any DMA at all. I think it is the right abstraction for an MHI driver to
> > pass kernel pointers into the subsystem interfaces, which then get
> > mapped by the bus driver that owns the DMA master.
> > 
> > This is similar to how e.g. USB drivers pass data into the USB core
> > interfaces, which then get the HCI driver to map/unmap it into the
> > DMA masters.
> 
> Ok, then this needs to be named a whole lot better than the original
> "dev" name had it.  Heck, even "parent" does not show that type of
> representation, make it "controller" or something else a whole lot more
> descriptive of what it really is please.
> 

Okay. I'll come up with something more relative.

Thanks,
Mani

> thanks,
> 
> greg k-h

Powered by blists - more mailing lists