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] [day] [month] [year] [list]
Message-ID: <20180717223636.125d5563@bbrezillon>
Date:   Tue, 17 Jul 2018 22:36:36 +0200
From:   Boris Brezillon <boris.brezillon@...tlin.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Miquel Raynal <miquel.raynal@...tlin.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Richard Weinberger <richard@....at>,
        Abhishek Sahu <absahu@...eaurora.org>,
        Archit Taneja <architt@...eaurora.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        linux-mtd <linux-mtd@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nand: ranw: qcom_nand: stop using phys_to_dma()

On Tue, 17 Jul 2018 22:29:58 +0200
Arnd Bergmann <arnd@...db.de> wrote:

> On Tue, Jul 17, 2018 at 10:01 PM, Boris Brezillon
> <boris.brezillon@...tlin.com> wrote:
> > Hi Arnd,
> >
> > On Wed, 11 Jul 2018 16:26:31 +0200
> > Arnd Bergmann <arnd@...db.de> wrote:
> >  
> >> On Wed, Jul 11, 2018 at 3:04 PM, Boris Brezillon
> >> <boris.brezillon@...tlin.com> wrote:  
> >> > On Wed, 11 Jul 2018 14:26:58 +0200
> >> > Arnd Bergmann <arnd@...db.de> wrote:
> >> >  
> >> >> Compile-testing this driver on x86 caused a link error:
> >> >>
> >> >> ERROR: "__phys_to_dma" [drivers/mtd/nand/raw/qcom_nandc.ko] undefined!
> >> >>
> >> >> The problem here is that the driver attempts to convert the physical
> >> >> address into the DMA controller as a dma_addr_t and calls phys_to_dma()
> >> >> to do the conversion.
> >> >>
> >> >> However, there is no generic way to convert a phys_addr_t into a dma_addr_t
> >> >> for anything other than RAM (which should use the dma-mapping API instead).
> >> >> The only correct use of phys_to_dma() instead is inside of the dma-mapping
> >> >> implementation.  
> >> >
> >> > Should we use dma_map_resource() to do the phys_addr_t to dma_addr_t
> >> > conversion?  
> >>
> >> I had not seen that interface before, but yes, that does seem like the best
> >> way to do it here.  
> >
> > Do you plan to send a new version using dma_map_resource()?  
> 
> I somehow thought you were going to do that yourself, but have now
> posted a new version of the patch the way you suggested.

I tend not to do that, unless I'm explicitly asked to :-).

> 
> > BTW, there's typo in the subject prefix (s/ranw/rawnand/).  
> 
> Hmm, missed that again in v2. Can you fix it up when applying?

Sure.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ