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: <20221025144138.GA8@edaa77c5b7e3>
Date:   Tue, 25 Oct 2022 16:41:38 +0200
From:   Tomas Marek <tomas.marek@...est.cz>
To:     Herbert Xu <herbert@...dor.apana.org.au>
Cc:     mpm@...enic.com, mcoquelin.stm32@...il.com,
        linux-arm-kernel@...ts.infradead.org, linux-crypto@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        alexandre.torgue@...s.st.com, oleg.karfich@...o.com
Subject: Re: [PATCH 1/2] hwrng: stm32 - fix number of returned bytes on read

On Fri, Oct 21, 2022 at 06:41:07PM +0800, Herbert Xu wrote:
> On Wed, Oct 12, 2022 at 06:09:23PM +0200, Tomas Marek wrote:
> >
> > diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c
> > index bc22178f83e8..8eaacefd498b 100644
> > --- a/drivers/char/hw_random/stm32-rng.c
> > +++ b/drivers/char/hw_random/stm32-rng.c
> > @@ -49,11 +49,13 @@ static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
> >  		/* Manage timeout which is based on timer and take */
> >  		/* care of initial delay time when enabling rng	*/
> >  		if (!sr && wait) {
> > -			retval = readl_relaxed_poll_timeout_atomic(priv->base
> > +			int ret;
> > +
> > +			ret = readl_relaxed_poll_timeout_atomic(priv->base
> 
> This would make a lot more sense if you called it err instead of ret.
> 
> But as you're fixing a real bug I'm going to apply your patch as is
> and you can post an incremental patch to improve it.

OK, sounds reasonable. I'll post new patch and rename ret to err.

Thanks for the hint and for the review.

Tomas

> 
> Thanks,
> -- 
> Email: Herbert Xu <herbert@...dor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ