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: <153089700685.143105.9967468507381208265@swboyd.mtv.corp.google.com>
Date:   Fri, 06 Jul 2018 10:10:06 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Aapo Vienamo <avienamo@...dia.com>,
        Peter Geis <pgwipeout@...il.com>
Cc:     Peter De Schrijver <pdeschrijver@...dia.com>,
        Prashant Gaikwad <pgaikwad@...dia.com>,
        Michael Turquette <mturquette@...libre.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-tegra@...r.kernel.org
Subject: Re: [PATCH 1/3] clk: tegra: refactor 7.1 div calculation

Quoting Aapo Vienamo (2018-07-04 00:51:48)
> On Tue, 3 Jul 2018 11:10:21 -0400
> Peter Geis <pgwipeout@...il.com> wrote:
> 
> > Good Morning,
> > 
> > Just a heads up.
> > During compilation with your patches, I get the following warning:
> > 
> > In file included from ./arch/arm/include/asm/div64.h:127:0,
> >                   from ./include/linux/kernel.h:174,
> >                   from drivers/clk/tegra/div71.c:17:
> > drivers/clk/tegra/div71.c: In function ‘div71_get’:
> > ./include/asm-generic/div64.h:222:28: warning: comparison of distinct 
> > pointer types lacks a cast
> >    (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
> >                              ^
> > drivers/clk/tegra/div71.c:40:2: note: in expansion of macro ‘do_div’
> >    do_div(divider_ux1, rate);
> >    ^~~~~~
> > 
> > Very Respectfully,
> > Peter Geis
> > 
>  
> That's indeed true. Looks like this warning is produced only on 32-bit
> arm as it uses a different variant of the do_div macro than arm64.
> 

divider_ux1 is an s64, but the generic do_div() macro is checking to
make sure that's compatible with a u64, and it isn't. Maybe you should
use a function like div64_long()?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ