[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190313182900.GA4926@lst.de>
Date: Wed, 13 Mar 2019 19:29:00 +0100
From: Christoph Hellwig <hch@....de>
To: Yue Haibing <yuehaibing@...wei.com>
Cc: linux@...linux.org.uk, akpm@...ux-foundation.org,
robin.murphy@....com, iamjoonsoo.kim@....com, hch@....de,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] ARM: dma-mapping: always clear allocated buffers in
__alloc_from_pool
On Tue, Mar 12, 2019 at 05:16:37PM +0800, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@...wei.com>
>
> Like commit 518a2f1925c3 ("dma-mapping: zero memory returned
> from dma_alloc_*"), if we want to map memory from the DMA
> allocator to userspace it must be zeroed at allocation time
> to prevent stale data leaks. On arm platform, if the allocator
> is pool_allocator in __dma_alloc, then the mem is alloced by
> __alloc_from_pool, which also need be zeroed.
The observations looks correct, and because this memory is already
remapped I don't think we need __dma_clear_buffer here.
But I'd love to see a review from Russell as well.
Powered by blists - more mailing lists