[PATCH] ASoC: Use memset_io to access I/O memory

Mark Brown broonie at kernel.org
Fri Sep 18 07:01:52 EDT 2020


On Fri, Sep 18, 2020 at 06:00:19PM +0800, Shane Chien wrote:

>  	/* clear the buffer for avoiding possible kernel info leaks */
>  	if (runtime->dma_area && !substream->ops->copy_user)
> -		memset(runtime->dma_area, 0, runtime->dma_bytes);
> +		memset_io(runtime->dma_area, 0, runtime->dma_bytes);

This is regular RAM that will be accessed by the devices rather than
memory mapped regions provided by devices, the _io variants are normally
for memory mapped regions on devices.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20200918/8ce5984e/attachment.sig>


More information about the Linux-mediatek mailing list