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: <20221029131119.2f000985@jic23-huawei>
Date:   Sat, 29 Oct 2022 13:11:19 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     "Sa, Nuno" <Nuno.Sa@...log.com>
Cc:     Deepak R Varma <drv@...lo.com>,
        "outreachy@...ts.linux.dev" <outreachy@...ts.linux.dev>,
        Lars-Peter Clausen <lars@...afoo.de>,
        "Hennerich, Michael" <Michael.Hennerich@...log.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] staging: iio: frequency: ad9834: Use div64_ul
 instead of do_div

On Fri, 28 Oct 2022 10:14:48 +0000
"Sa, Nuno" <Nuno.Sa@...log.com> wrote:

> > -----Original Message-----
> > From: Deepak R Varma <drv@...lo.com>
> > Sent: Friday, October 28, 2022 12:00 AM
> > To: outreachy@...ts.linux.dev; Lars-Peter Clausen <lars@...afoo.de>;
> > Hennerich, Michael <Michael.Hennerich@...log.com>; Jonathan Cameron
> > <jic23@...nel.org>; Greg Kroah-Hartman <gregkh@...uxfoundation.org>;
> > linux-iio@...r.kernel.org; linux-staging@...ts.linux.dev; linux-
> > kernel@...r.kernel.org
> > Subject: [PATCH v2] staging: iio: frequency: ad9834: Use div64_ul instead of
> > do_div
> > 
> > [External]
> > 
> > do_div() does a 64-by-32 division. Here the divisor is an unsigned long
> > which on some platforms is 64 bit wide. So use div64_ul instead of do_div
> > to avoid a possible truncation. Issue identified using the
> > coccicheck tool.
> > 
> > Signed-off-by: Deepak R Varma <drv@...lo.com>
> > ---  
> 
> Clearly, I should have looked better and only reply to this one:
> 
> Reviewed-by: Nuno Sá <nuno.sa@...log.com>

As per the email Greg linked to, please take a close look at the surround code
and include analysis of whether the value can actually be greater than 32 bits.
Note that in most cases that would actually mean the code was broken on 32 bit
platforms.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ