Skip to content

ALSA: input validation for control element writes

Takashi Iwai alsa-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ASoC: topology: Drop superfluous check of CONFIG_SND_CTL_VALIDATIONsound/soc/soc-topology.c+1 -10 replies
2/4ALSA: control: Rename CONFIG_SND_CTL_VALIDATION to CONFIG_SND_CTL_DEBUGinclude/sound/control.h sound/core/Kconfig sound/core/control.c+14 -90 replies
3/4ALSA: control: Drop superfluous ifdef CONFIG_SND_CTL_DEBUGsound/core/control.c+0 -160 replies
4/4ALSA: control: Add input validationsound/core/Kconfig sound/core/control.c+59 -200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] ALSA: input validation for control element writes

Hi,

this is a patch set to add a new feature to ALSA control interface, a validation for the write to control elements. So far we rely fully on the driver implementation to deal with the user inputs with invalid values (e.g. a value outside the defined range). This patch set allows ALSA core to verify the input values beforehand and returns the error immediately if the validation fails.

The feature is enabled with a new Kconfig for now, as it brings a slight performance overhead, although this could be turned on as default in most cases, IMO.

The patch set contains a few preliminary cleanup patches. The essential change is only the last one.

Takashi

===

Takashi Iwai (4):
ASoC: topology: Drop superfluous check of CONFIG_SND_CTL_VALIDATION
ALSA: control: Rename CONFIG_SND_CTL_VALIDATION to
CONFIG_SND_CTL_DEBUG
ALSA: control: Drop superfluous ifdef CONFIG_SND_CTL_DEBUG
ALSA: control: Add input validation

 include/sound/control.h  |  2 +-
 sound/core/Kconfig       | 27 ++++++++++---
 sound/core/control.c     | 87 +++++++++++++++++++++++-----------------
 sound/soc/soc-topology.c |  2 +-
 4 files changed, 73 insertions(+), 45 deletions(-)
Signature · 1 line
2.35.3