From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Takashi Iwai <tiwai@suse.de>
Cc: linux-sound@vger.kernel.org, Paul Menzel <pmenzel@molgen.mpg.de>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 3/6] ALSA: control: Apply sanity check of input values for user elements
Date: Sun, 16 Jun 2024 12:39:31 +0900 [thread overview]
Message-ID: <20240616033931.GA518788@workstation.local> (raw)
In-Reply-To: <87le365tei.wl-tiwai@suse.de>
On Sat, Jun 15, 2024 at 01:37:09PM +0200, Takashi Iwai wrote:
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH v3] ALSA: control: Apply sanity check of input values for user elements
>
> Although we have already a mechanism for sanity checks of input values
> for control writes, it's not applied unless the kconfig
> CONFIG_SND_CTL_INPUT_VALIDATION is set due to the performance reason.
> Nevertheless, it still makes sense to apply the same check for user
> elements despite of its cost, as that's the only way to filter out the
> invalid values; the user controls are handled solely in ALSA core
> code, and there is no corresponding driver, after all.
>
> This patch adds the same input value validation for user control
> elements at its put callback. The kselftest will be happier with this
> change, as the incorrect values will be bailed out now with errors.
>
> For other normal controls, the check is applied still only when
> CONFIG_SND_CTL_INPUT_VALIDATION is set.
>
> Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
> Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09405@molgen.mpg.de
> Reviewed-by: Jaroslav Kysela <perex@perex.cz>
> Reviewed-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> sound/core/control.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Thanks
Takashi Sakamoto
next prev parent reply other threads:[~2024-06-16 3:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 15:37 [PATCH v2 0/6] ALSA: some driver fixes for control input validations Takashi Iwai
2024-06-14 15:37 ` [PATCH v2 1/6] ALSA: vmaster: Return error for invalid input values Takashi Iwai
2024-06-14 15:37 ` [PATCH v2 2/6] ALSA: hda: Return -EINVAL for invalid volume/switch inputs Takashi Iwai
2024-06-14 15:37 ` [PATCH v2 3/6] ALSA: control: Apply sanity check of input values for user elements Takashi Iwai
2024-06-15 5:13 ` Takashi Sakamoto
2024-06-15 7:28 ` Takashi Iwai
2024-06-15 8:02 ` Takashi Sakamoto
2024-06-15 8:30 ` Takashi Iwai
2024-06-15 11:37 ` Takashi Iwai
2024-06-16 3:39 ` Takashi Sakamoto [this message]
2024-06-14 15:37 ` [PATCH v2 4/6] kselftest/alsa: mixer-test: Skip write verification for volatile controls Takashi Iwai
2024-06-14 15:43 ` Jaroslav Kysela
2024-06-14 15:57 ` Mark Brown
2024-06-14 16:08 ` Takashi Iwai
2024-06-14 16:28 ` Mark Brown
2024-06-14 15:37 ` [PATCH v2 5/6] ALSA: chmap: Mark Channel Map controls as volatile Takashi Iwai
2024-06-14 15:37 ` [PATCH v2 6/6] ALSA: hda: Add input value sanity checks to HDMI channel map controls Takashi Iwai
2024-06-14 15:44 ` Jaroslav Kysela
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=20240616033931.GA518788@workstation.local \
--to=o-takashi@sakamocchi.jp \
--cc=broonie@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pmenzel@molgen.mpg.de \
--cc=tiwai@suse.de \
/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.