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]
Date:   Sat, 21 Jan 2023 15:00:44 +0000
From:   Conor Dooley <conor@...nel.org>
To:     Jesse Taube <mr.bossman075@...il.com>
Cc:     Conor Dooley <conor.dooley@...rochip.com>,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Yimin Gu <ustcymgu@...il.com>,
        Waldemar Brodkorb <wbx@...nadk.org>,
        Albert Ou <aou@...s.berkeley.edu>,
        Palmer Dabbelt <palmer@...belt.com>,
        Paul Walmsley <paul.walmsley@...ive.com>
Subject: Re: [PATCH v1 1/2] riscv: Kconfig: Allow RV32 to build with no MMU

On Fri, Jan 20, 2023 at 08:57:38PM +0000, Conor Dooley wrote:
> > > > diff --git a/drivers/clk/clk-k210.c b/drivers/clk/clk-k210.c
> > > > index 67a7cb3503c3..17c5bfb384ad 100644
> > > > --- a/drivers/clk/clk-k210.c
> > > > +++ b/drivers/clk/clk-k210.c
> > > > @@ -495,7 +495,7 @@ static unsigned long k210_pll_get_rate(struct clk_hw *hw,
> > > >   	f = FIELD_GET(K210_PLL_CLKF, reg) + 1;
> > > >   	od = FIELD_GET(K210_PLL_CLKOD, reg) + 1;
> > > > -	return (u64)parent_rate * f / (r * od);
> > > > +	return div_u64(parent_rate * f, r * od);
> > > 
> > > Nope, that's wrong. I omitted the cast...
> > > 
> > > 	return div_u64((u64)parent_rate * f, r * od);
> 
> 
> > Ah that's a much better fix, shall I prepend this to the set and author you?
> 
> Uh, I'd rather check that it is a functional fix first!
> I have the board, so I'll give it a go tomorrow and let you know.

Gave it a go, board still works with revised version of this change in
place.

Thanks,
Conor.


Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ