aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorTakashi Iwai <[email protected]>2022-06-09 14:02:19 +0200
committerTakashi Iwai <[email protected]>2022-06-15 07:45:28 +0200
commitf5e829f92a494a0b66d309497bab4e9d10d4ce3e (patch)
tree291439188b9d68267c060514dd02f86d924a4499 /lib/mpi/mpi-sub-ui.c
parent4e54316ad2485dedf8570fc2afa6fa6ce32db207 (diff)
ALSA: control: Add input validation
This patch adds a new feature to enable the validation of input data to control elements in the ALSA core side. When CONFIG_SND_CTL_INPUT_VALIDATION is set, ALSA core verifies whether the each input value via control API is in the defined ranges, also checks whether it's aligned to the defined steps. If an invalid value is detected, ALSA core returns -EINVAL error immediately without passing further to the driver's callback. So this is a kind of hardening for (badly written) drivers that have no proper error checks, at the cost of a slight performance overhead. Technically seen, this reuses a part of the existing validation code for CONFIG_SND_CTL_DEBUG case with a slight modification to suppress error prints for the input validation. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions