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]
Date:   Wed, 2 May 2018 11:16:35 +0200
From:   Boris Brezillon <boris.brezillon@...tlin.com>
To:     Ladislav Michl <ladis@...ux-mips.org>
Cc:     linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
        Boris Brezillon <boris.brezillon@...e-electrons.com>,
        Peter Ujfalusi <peter.ujfalusi@...com>,
        Roger Quadros <rogerq@...com>,
        Aaro Koskinen <aaro.koskinen@....fi>,
        Tony Lindgren <tony@...mide.com>,
        "H. Nikolaus Schaller" <hns@...delico.com>,
        Andreas Kemnade <andreas@...nade.info>
Subject: Re: [PATCH v2] mtd: onenand: omap2: Disable DMA for HIGHMEM buffers

On Wed, 2 May 2018 10:06:36 +0200
Ladislav Michl <ladis@...ux-mips.org> wrote:

> Hi Boris,
> 
> (and apologies for delay)
> 
> On Fri, Apr 20, 2018 at 10:01:34PM +0200, Boris Brezillon wrote:
> > Hi Ladislav,
> > 
> > On Mon, 16 Apr 2018 08:52:59 +0200
> > Ladislav Michl <ladis@...ux-mips.org> wrote:
> >   
> > > dma_map_single doesn't get the proper DMA address for vmalloced area,  
> > 
> > That's not true, it returns the right DMA (physical) address, it's just
> > that:  
> 
> To be honest I used log message from commit dcf08227e964 which is dealing
> with the same issue.

Okay, looks like I was wrong. The problem is caused by the
virt_to_page() call done in dma_map_single_attrs() which expects a
valid virtual address (one that is present in the identity mapping). If
you pass a vmalloc address to it, the conversion is broken and that's
probably why you end up with a NULL pointer exception.

Maybe you should just say that dma_map_single() does not work for
vmalloc-ed buffers instead of saying that it does not get the right DMA
address.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ