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: <20221029131139.016c89ce@jic23-huawei>
Date:   Sat, 29 Oct 2022 13:11:39 +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] staging: iio: frequency: ad9832: Use div64_ul instead
 of do_div

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

> > -----Original Message-----
> > From: Deepak R Varma <drv@...lo.com>
> > Sent: Thursday, October 27, 2022 11:54 PM
> > 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] staging: iio: frequency: ad9832: 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>
> > ---  
> 
> 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