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>] [day] [month] [year] [list]
Message-ID: <B995B0A0-165D-47CA-A766-3110D6C0DD60@oracle.com>
Date:   Tue, 23 Mar 2021 17:56:13 +0000
From:   Santosh Shilimkar <santosh.shilimkar@...cle.com>
To:     Arnd Bergmann <arnd@...nel.org>
CC:     Santosh Shilimkar <ssantosh@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        "soc@...nel.org" <soc@...nel.org>, Arnd Bergmann <arnd@...db.de>,
        Russell King <linux@...linux.org.uk>,
        Robin Murphy <robin.murphy@....com>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Jim Quinlan <james.quinlan@...adcom.com>,
        Maxime Ripard <maxime@...no.tech>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "clang-built-linux@...glegroups.com" 
        <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] ARM: keystone: fix integer overflow warning



> On Mar 23, 2021, at 6:18 AM, Arnd Bergmann <arnd@...nel.org> wrote:
> 
> From: Arnd Bergmann <arnd@...db.de>
> 
> clang warns about an impossible condition when building with 32-bit
> phys_addr_t:
> 
> arch/arm/mach-keystone/keystone.c:79:16: error: result of comparison of constant 51539607551 with expression of type 'phys_addr_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
>            mem_end   > KEYSTONE_HIGH_PHYS_END) {
>            ~~~~~~~   ^ ~~~~~~~~~~~~~~~~~~~~~~
> arch/arm/mach-keystone/keystone.c:78:16: error: result of comparison of constant 34359738368 with expression of type 'phys_addr_t' (aka 'unsigned int') is always true [-Werror,-Wtautological-constant-out-of-range-compare]
>        if (mem_start < KEYSTONE_HIGH_PHYS_START ||
>            ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Change the temporary variable to a fixed-size u64 to avoid the warning.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> —

Looks fine to me.

Acked-by: Santosh Shilimkar <ssantosh@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ