lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a77f0c42-70bf-4d6a-bb45-d435e4f29809@oss.qualcomm.com>
Date: Wed, 19 Nov 2025 15:35:57 +0000
From: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
To: Jonathan Marek <jonathan@...ek.ca>, linux-arm-msm@...r.kernel.org
Cc: Srinivas Kandagatla <srini@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
        "open list:QCOM AUDIO (ASoC) DRIVERS" <linux-sound@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/9] ASoC: codecs: lpass-wsa-macro: remove unnecessary
 bounds check



On 11/17/25 5:15 AM, Jonathan Marek wrote:
> WSA_MACRO_RX0 is 0 and WSA_MACRO_RX_MIX1 is (WSA_MACRO_RX_MAX-1), which
> means it is not possible for the bounds check to fail.
> 
> Removing the WSA_MACRO_RX_MIX1 limit is needed to add support for other
> ports (RX4, RX5, etc.), in which case the valid range depends on the HW
> version: rely on the driver only setting valid ports in active_ch_mask
> instead (already the case).
> 
> Signed-off-by: Jonathan Marek <jonathan@...ek.ca>
> ---
>  sound/soc/codecs/lpass-wsa-macro.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 

Thanks for Cleaning these invalid checks.

Its convenient to have a cover letter for this series, which makes easy
for giving Rb and Tb's,

Consider this next time when you send more than one patch.



Tested-by: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>
#on T14s
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@....qualcomm.com>

> diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c
> index 38faa9074ca3e..6e54c1beac8f9 100644
> --- a/sound/soc/codecs/lpass-wsa-macro.c
> +++ b/sound/soc/codecs/lpass-wsa-macro.c
> @@ -1168,12 +1168,6 @@ static int wsa_macro_set_prim_interpolator_rate(struct snd_soc_dai *dai,
>  
>  	for_each_set_bit(port, &wsa->active_ch_mask[dai->id], WSA_MACRO_RX_MAX) {
>  		int_1_mix1_inp = port;
> -		if ((int_1_mix1_inp < WSA_MACRO_RX0) || (int_1_mix1_inp > WSA_MACRO_RX_MIX1)) {
> -			dev_err(component->dev,	"%s: Invalid RX port, Dai ID is %d\n",
> -				__func__, dai->id);
> -			return -EINVAL;
> -		}
> -
>  		int_mux_cfg0 = CDC_WSA_RX_INP_MUX_RX_INT0_CFG0;
>  
>  		/*
> @@ -1220,11 +1214,6 @@ static int wsa_macro_set_mix_interpolator_rate(struct snd_soc_dai *dai,
>  
>  	for_each_set_bit(port, &wsa->active_ch_mask[dai->id], WSA_MACRO_RX_MAX) {
>  		int_2_inp = port;
> -		if ((int_2_inp < WSA_MACRO_RX0) || (int_2_inp > WSA_MACRO_RX_MIX1)) {
> -			dev_err(component->dev,	"%s: Invalid RX port, Dai ID is %d\n",
> -				__func__, dai->id);
> -			return -EINVAL;
> -		}
>  
>  		int_mux_cfg1 = CDC_WSA_RX_INP_MUX_RX_INT0_CFG1;
>  		for (j = 0; j < NUM_INTERPOLATORS; j++) {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ