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  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]
Date:   Tue, 19 Mar 2019 08:19:51 +0100
From:   Michal Simek <michal.simek@...inx.com>
To:     Stephen Boyd <sboyd@...nel.org>,
        Jolly Shah <jolly.shah@...inx.com>,
        <linux-clk@...r.kernel.org>, <michal.simek@...inx.com>,
        <mturquette@...libre.com>, <sboyd@...eaurora.org>
CC:     <rajanv@...inx.com>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, Rajan Vaja <rajan.vaja@...inx.com>,
        Jolly Shah <jollys@...inx.com>
Subject: Re: [PATCH] drivers: clk: zynqmp: Allow zero divisor value

On 18. 03. 19 20:42, Stephen Boyd wrote:
> Quoting Michal Simek (2019-03-18 05:48:52)
>> On 05. 03. 19 0:27, Jolly Shah wrote:
>>> From: Rajan Vaja <rajan.vaja@...inx.com>
>>>
>>> Zero divider is valid and default for some of ZynqMP
>>> clocks. Allow zero divisor when CLK_DIVIDER_ALLOW_ZERO
>>> for the clock is set.
>>>
>>> Signed-off-by: Rajan Vaja <rajanv@...inx.com>
>>> Signed-off-by: Jolly Shah <jollys@...inx.com>
>>> ---
>>>  drivers/clk/zynqmp/divider.c | 7 +++++++
>>>  1 file changed, 7 insertions(+)
>>>
>>> diff --git a/drivers/clk/zynqmp/divider.c b/drivers/clk/zynqmp/divider.c
>>> index a371c66..e146b6f 100644
>>> --- a/drivers/clk/zynqmp/divider.c
>>> +++ b/drivers/clk/zynqmp/divider.c
>>> @@ -76,6 +76,13 @@ static unsigned long zynqmp_clk_divider_recalc_rate(struct clk_hw *hw,
>>>       else
>>>               value = div >> 16;
>>>  
>>> +     if (!value) {
>>> +             WARN(!(divider->flags & CLK_DIVIDER_ALLOW_ZERO),
>>> +                  "%s: Zero divisor and CLK_DIVIDER_ALLOW_ZERO not set\n",
>>> +                  clk_name);
>>> +             return parent_rate;
>>> +     }
>>> +
>>>       return DIV_ROUND_UP_ULL(parent_rate, value);
>>>  }
>>>  
>>>
>>
>> Stephen: Do you want to take it via your tree?
>>
> 
> Sure.

ok. Then your turn with that two patches when you have time.

Thanks,
Michal


Powered by blists - more mailing lists