All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Shane Chien <shane.chien@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	devicetree@vger.kernel.org, wsd_upstream@mediatek.com,
	jiaxin.yu@mediatek.com, eason.yen@mediatek.com
Subject: Re: [PATCH] ASoC: Use memset_io to access I/O memory
Date: Fri, 18 Sep 2020 12:01:52 +0100	[thread overview]
Message-ID: <20200918110152.GD5703@sirena.org.uk> (raw)
In-Reply-To: <1600423219-29058-2-git-send-email-shane.chien@mediatek.com>

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Shane Chien <shane.chien@mediatek.com>
Cc: devicetree@vger.kernel.org, wsd_upstream@mediatek.com,
	linux-kernel@vger.kernel.org, jiaxin.yu@mediatek.com,
	linux-mediatek@lists.infradead.org, eason.yen@mediatek.com,
	Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [PATCH] ASoC: Use memset_io to access I/O memory
Date: Fri, 18 Sep 2020 12:01:52 +0100	[thread overview]
Message-ID: <20200918110152.GD5703@sirena.org.uk> (raw)
In-Reply-To: <1600423219-29058-2-git-send-email-shane.chien@mediatek.com>


[-- Attachment #1.1: Type: text/plain, Size: 480 bytes --]

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.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply	other threads:[~2020-09-18 11:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 10:00 [PATCH 0/1] Use memset_io to access I/O memory Shane Chien
2020-09-18 10:00 ` Shane Chien
2020-09-18 10:00 ` [PATCH] ASoC: " Shane Chien
2020-09-18 10:00   ` Shane Chien
2020-09-18 11:01   ` Mark Brown [this message]
2020-09-18 11:01     ` Mark Brown
2020-09-18 10:05 ` [PATCH 0/1] " Mark Brown
2020-09-18 10:05   ` Mark Brown

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=20200918110152.GD5703@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eason.yen@mediatek.com \
    --cc=jiaxin.yu@mediatek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=shane.chien@mediatek.com \
    --cc=wsd_upstream@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.