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] [day] [month] [year] [list]
Message-ID: <0b3603b7-e09d-2754-90d1-2095efc2fbd5@quicinc.com>
Date: Fri, 9 Aug 2024 10:48:53 +0530
From: Imran Shaik <quic_imrashai@...cinc.com>
To: Stephen Boyd <sboyd@...nel.org>, Bjorn Andersson <andersson@...nel.org>,
        David Dai <daidavid1@...eaurora.org>,
        Michael Turquette
	<mturquette@...libre.com>
CC: <linux-arm-msm@...r.kernel.org>, <linux-clk@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, Ajit Pandey <quic_ajipan@...cinc.com>,
        "Taniya Das" <quic_tdas@...cinc.com>,
        Jagadeesh Kona
	<quic_jkona@...cinc.com>,
        "Satya Priya Kakitapalli"
	<quic_skakitap@...cinc.com>,
        Mike Tipton <quic_mdtipton@...cinc.com>, <stable@...r.kernel.org>
Subject: Re: [PATCH] clk: qcom: clk-rpmh: Fix overflow in BCM vote



On 8/9/2024 1:13 AM, Stephen Boyd wrote:
> Quoting Imran Shaik (2024-08-08 00:05:02)
>> From: Mike Tipton <quic_mdtipton@...cinc.com>
>>
>> Valid frequencies may result in BCM votes that exceed the max HW value.
>> Set vote ceiling to BCM_TCS_CMD_VOTE_MASK to ensure the votes aren't
>> truncated, which can result in lower frequencies than desired.
>>
>> Fixes: 04053f4d23a4 ("clk: qcom: clk-rpmh: Add IPA clock support")
>> Cc: stable@...r.kernel.org
>> Signed-off-by: Mike Tipton <quic_mdtipton@...cinc.com>
>> Signed-off-by: Imran Shaik <quic_imrashai@...cinc.com>
>> ---
>>   drivers/clk/qcom/clk-rpmh.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
>> index bb82abeed88f..233ccd365a37 100644
>> --- a/drivers/clk/qcom/clk-rpmh.c
>> +++ b/drivers/clk/qcom/clk-rpmh.c
>> @@ -263,6 +263,9 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable)
>>                  cmd_state = 0;
>>          }
>>   
>> +       if (cmd_state > BCM_TCS_CMD_VOTE_MASK)
>> +               cmd_state = BCM_TCS_CMD_VOTE_MASK;
>> +
> 
> This is
> 
> 	cmd_state = min(cmd_state, BCM_TCS_CMD_VOTE_MASK);

Sure, I will update this logic and post another series.

Thanks,
Imran

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ