From: Greg Kroah-Hartman Date: Mon, 26 Oct 2020 12:17:27 +0000 (+0100) Subject: drop asoc-topology-disable-size-checks-for-bytes_ext-cont.patch X-Git-Tag: v4.4.241~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=550e2b6bc838eac3a344dbc55f74fd0e7cc0fc2a;p=thirdparty%2Fkernel%2Fstable-queue.git drop asoc-topology-disable-size-checks-for-bytes_ext-cont.patch from 4.14 and 4.9 queues --- diff --git a/queue-4.14/asoc-topology-disable-size-checks-for-bytes_ext-cont.patch b/queue-4.14/asoc-topology-disable-size-checks-for-bytes_ext-cont.patch deleted file mode 100644 index d0f39915078..00000000000 --- a/queue-4.14/asoc-topology-disable-size-checks-for-bytes_ext-cont.patch +++ /dev/null @@ -1,70 +0,0 @@ -From c1fdacabc06c11f13bdfe47ac07129fbabdfd2e9 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 17 Sep 2020 13:39:12 +0300 -Subject: ASoC: topology: disable size checks for bytes_ext controls if needed - -From: Pierre-Louis Bossart - -[ Upstream commit 6788fc1a66a0c1d1cec7a0f84f94b517eae8611c ] - -When CONFIG_SND_CTL_VALIDATION is set, accesses to extended bytes -control generate spurious error messages when the size exceeds 512 -bytes, such as - -[ 11.224223] sof_sdw sof_sdw: control 2:0:0:EQIIR5.0 eqiir_coef_5:0: -invalid count 1024 - -In addition the error check returns -EINVAL which has the nasty side -effect of preventing applications accessing controls from working, -e.g. - -root@plb:~# alsamixer -cannot load mixer controls: Invalid argument - -It's agreed that the control interface has been abused since 2014, but -forcing a check should not prevent existing solutions from working. - -This patch skips the checks conditionally if CONFIG_SND_CTL_VALIDATION -is set and the byte array provided by topology is > 512. This -preserves the checks for all other cases. - -Fixes: 1a3232d2f61d2 ('ASoC: topology: Add support for TLV bytes controls') -BugLink: https://github.com/thesofproject/linux/issues/2430 -Reported-by: Takashi Iwai -Signed-off-by: Pierre-Louis Bossart -Reviewed-by: Ranjani Sridharan -Reviewed-by: Bard Liao -Reviewed-by: Jaska Uimonen -Signed-off-by: Kai Vehmanen -Link: https://lore.kernel.org/r/20200917103912.2565907-1-kai.vehmanen@linux.intel.com -Signed-off-by: Mark Brown -Signed-off-by: Sasha Levin ---- - sound/soc/soc-topology.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c -index 50aa45525be5a..174d923b5801d 100644 ---- a/sound/soc/soc-topology.c -+++ b/sound/soc/soc-topology.c -@@ -613,6 +613,17 @@ static int soc_tplg_kcontrol_bind_io(struct snd_soc_tplg_ctl_hdr *hdr, - k->info = snd_soc_bytes_info_ext; - k->tlv.c = snd_soc_bytes_tlv_callback; - -+ /* -+ * When a topology-based implementation abuses the -+ * control interface and uses bytes_ext controls of -+ * more than 512 bytes, we need to disable the size -+ * checks, otherwise accesses to such controls will -+ * return an -EINVAL error and prevent the card from -+ * being configured. -+ */ -+ if (IS_ENABLED(CONFIG_SND_CTL_VALIDATION) && sbe->max > 512) -+ k->access |= SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK; -+ - ext_ops = tplg->bytes_ext_ops; - num_ops = tplg->bytes_ext_ops_count; - for (i = 0; i < num_ops; i++) { --- -2.25.1 - diff --git a/queue-4.14/series b/queue-4.14/series index 47c5a9c14ea..5ccd426926d 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -64,7 +64,6 @@ video-fbdev-sis-fix-null-ptr-dereference.patch hid-roccat-add-bounds-checking-in-kone_sysfs_write_s.patch pinctrl-mcp23s08-fix-mcp23x17_regmap-initialiser.patch pinctrl-mcp23s08-fix-mcp23x17-precious-range.patch -asoc-topology-disable-size-checks-for-bytes_ext-cont.patch ath6kl-wmi-prevent-a-shift-wrapping-bug-in-ath6kl_wm.patch misc-mic-scif-fix-error-handling-path.patch alsa-seq-oss-avoid-mutex-lock-for-a-long-time-ioctl.patch diff --git a/queue-4.9/asoc-topology-disable-size-checks-for-bytes_ext-cont.patch b/queue-4.9/asoc-topology-disable-size-checks-for-bytes_ext-cont.patch deleted file mode 100644 index 91f0be36ac9..00000000000 --- a/queue-4.9/asoc-topology-disable-size-checks-for-bytes_ext-cont.patch +++ /dev/null @@ -1,70 +0,0 @@ -From c02a7b8e9108adc94ef4030da2e8f121793fc26b Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 17 Sep 2020 13:39:12 +0300 -Subject: ASoC: topology: disable size checks for bytes_ext controls if needed - -From: Pierre-Louis Bossart - -[ Upstream commit 6788fc1a66a0c1d1cec7a0f84f94b517eae8611c ] - -When CONFIG_SND_CTL_VALIDATION is set, accesses to extended bytes -control generate spurious error messages when the size exceeds 512 -bytes, such as - -[ 11.224223] sof_sdw sof_sdw: control 2:0:0:EQIIR5.0 eqiir_coef_5:0: -invalid count 1024 - -In addition the error check returns -EINVAL which has the nasty side -effect of preventing applications accessing controls from working, -e.g. - -root@plb:~# alsamixer -cannot load mixer controls: Invalid argument - -It's agreed that the control interface has been abused since 2014, but -forcing a check should not prevent existing solutions from working. - -This patch skips the checks conditionally if CONFIG_SND_CTL_VALIDATION -is set and the byte array provided by topology is > 512. This -preserves the checks for all other cases. - -Fixes: 1a3232d2f61d2 ('ASoC: topology: Add support for TLV bytes controls') -BugLink: https://github.com/thesofproject/linux/issues/2430 -Reported-by: Takashi Iwai -Signed-off-by: Pierre-Louis Bossart -Reviewed-by: Ranjani Sridharan -Reviewed-by: Bard Liao -Reviewed-by: Jaska Uimonen -Signed-off-by: Kai Vehmanen -Link: https://lore.kernel.org/r/20200917103912.2565907-1-kai.vehmanen@linux.intel.com -Signed-off-by: Mark Brown -Signed-off-by: Sasha Levin ---- - sound/soc/soc-topology.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c -index e9c57bd3c02bf..ea5e86ceb6601 100644 ---- a/sound/soc/soc-topology.c -+++ b/sound/soc/soc-topology.c -@@ -521,6 +521,17 @@ static int soc_tplg_kcontrol_bind_io(struct snd_soc_tplg_ctl_hdr *hdr, - k->info = snd_soc_bytes_info_ext; - k->tlv.c = snd_soc_bytes_tlv_callback; - -+ /* -+ * When a topology-based implementation abuses the -+ * control interface and uses bytes_ext controls of -+ * more than 512 bytes, we need to disable the size -+ * checks, otherwise accesses to such controls will -+ * return an -EINVAL error and prevent the card from -+ * being configured. -+ */ -+ if (IS_ENABLED(CONFIG_SND_CTL_VALIDATION) && sbe->max > 512) -+ k->access |= SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK; -+ - ext_ops = tplg->bytes_ext_ops; - num_ops = tplg->bytes_ext_ops_count; - for (i = 0; i < num_ops; i++) { --- -2.25.1 - diff --git a/queue-4.9/series b/queue-4.9/series index c427b87b98b..e27d9f81499 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -41,7 +41,6 @@ drivers-virt-fsl_hypervisor-fix-error-handling-path.patch video-fbdev-vga16fb-fix-setting-of-pixclock-because-.patch video-fbdev-sis-fix-null-ptr-dereference.patch hid-roccat-add-bounds-checking-in-kone_sysfs_write_s.patch -asoc-topology-disable-size-checks-for-bytes_ext-cont.patch ath6kl-wmi-prevent-a-shift-wrapping-bug-in-ath6kl_wm.patch misc-mic-scif-fix-error-handling-path.patch alsa-seq-oss-avoid-mutex-lock-for-a-long-time-ioctl.patch