From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Mark Brown <broonie@opensource.wolfsonmciro.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH] ASoC: Taint the kernel if debugfs is used to write directly to CODECs
Date: Sun, 09 Jan 2011 13:56:58 +0000 [thread overview]
Message-ID: <1294581418.4472.146.camel@odin> (raw)
In-Reply-To: <1294329950-3881-1-git-send-email-broonie@opensource.wolfsonmciro.com>
On Thu, 2011-01-06 at 16:05 +0000, Mark Brown wrote:
> Since direct register writes may confuse the drivers and are supposed
> to be used only in diagnostic situations discourage their use in
> production by tainting the kernel when we do a write.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmciro.com>
> ---
> sound/soc/soc-core.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index a233607..dbca5023 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -209,6 +209,10 @@ static ssize_t codec_reg_write_file(struct file *file,
> start++;
> if (strict_strtoul(start, 16, &value))
> return -EINVAL;
> +
> + /* Userspace has been fiddling around behind the kernel's back */
> + add_taint(TAINT_USER);
> +
> snd_soc_write(codec, reg, value);
> return buf_size;
> }
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
next prev parent reply other threads:[~2011-01-09 13:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 16:05 [PATCH] ASoC: Taint the kernel if debugfs is used to write directly to CODECs Mark Brown
2011-01-09 13:56 ` Liam Girdwood [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-01-06 16:16 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=1294581418.4472.146.camel@odin \
--to=lrg@slimlogic.co.uk \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmciro.com \
--cc=patches@opensource.wolfsonmicro.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;
as well as URLs for NNTP newsgroup(s).