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: <4881796E12491D4BB15146FE0209CE646785A13C@DE02WEMBXB.internal.synopsys.com>
Date:   Fri, 4 Nov 2016 05:33:54 +0000
From:   Alexey Brodkin <Alexey.Brodkin@...opsys.com>
To:     Vineet Gupta <Vineet.Gupta1@...opsys.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        Vineet Gupta <Vineet.Gupta1@...opsys.com>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH v2] arc: Implement arch-specific dma_map_ops.mmap

Hi Vineet,

> -----Original Message-----
> From: Vineet Gupta [mailto:vgupta@...opsys.com]
> Sent: Thursday, November 03, 2016 8:04 PM
> To: Alexey Brodkin <Alexey.Brodkin@...opsys.com>; linux-snps-arc@...ts.infradead.org
> Cc: linux-kernel@...r.kernel.org; linux-arch@...r.kernel.org; Vineet Gupta <Vineet.Gupta1@...opsys.com>; Marek Szyprowski
> <m.szyprowski@...sung.com>; stable@...r.kernel.org
> Subject: Re: [PATCH v2] arc: Implement arch-specific dma_map_ops.mmap
> 
> On 11/03/2016 08:06 AM, Alexey Brodkin wrote:
> > We used to use generic implementation of dma_map_ops.mmap which is
> > dma_common_mmap() but that only worked for simpler cached mappings when
> > vaddr = paddr.
> >
> > If a driver requests uncached DMA buffer kernel maps it to virtual
> > address so that MMU gets involved and page uncached status takes into
> > account. In that case usage of dma_common_mmap() lead to mapping of
> > vaddr to vaddr for user-space which is obviously wrong. For more detals
> > please refer to verbose explanation here [1].
> >
> > So here we implement our own version of mmap() which always deals
> > with dma_addr and maps underlying memory to user-space properly
> > (note that DMA buffer mapped to user-space is always uncached
> > because there's no way to properly manage cache from user-space).
> >
> > [1] https://lkml.org/lkml/2016/10/26/973
> >
> > Signed-off-by: Alexey Brodkin <abrodkin@...opsys.com>
> > Reviewed-by: Catalin Marinas <catalin.marinas@....com>
> > Cc: Marek Szyprowski <m.szyprowski@...sung.com>
> > Cc: Vineet Gupta <vgupta@...opsys.com>
> > Cc: <stable@...r.kernel.org>
> 
> I've added a stable 4.5+, since ARC didn't use dma ops until 4.5-rc1.

Again I was hitting a strange problem when sending patch via "git send-email" to
address "<stable@...r.kernel.org> # 3.3.x". Mail server complains on wrong email.
Thus I settled to just mention stable@...r.kernel.org.

Anyways, thanks for doing that!

-Alexey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ