From: Christoph Hellwig <hch@lst.de>
To: Yue Haibing <yuehaibing@huawei.com>
Cc: linux@armlinux.org.uk, akpm@linux-foundation.org,
robin.murphy@arm.com, iamjoonsoo.kim@lge.com, hch@lst.de,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: dma-mapping: always clear allocated buffers in __alloc_from_pool
Date: Wed, 13 Mar 2019 19:29:00 +0100 [thread overview]
Message-ID: <20190313182900.GA4926@lst.de> (raw)
In-Reply-To: <20190312091637.16412-1-yuehaibing@huawei.com>
On Tue, Mar 12, 2019 at 05:16:37PM +0800, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.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.
prev parent reply other threads:[~2019-03-13 18:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 9:16 Yue Haibing
2019-03-13 18:29 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190313182900.GA4926@lst.de \
--to=hch@lst.de \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=robin.murphy@arm.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome