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]
Date:   Thu, 15 Apr 2021 17:49:14 +0200
From:   Thierry Reding <thierry.reding@...il.com>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     Jonathan Hunter <jonathanh@...dia.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        dri-devel@...ts.freedesktop.org, linux-tegra@...r.kernel.org,
        linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH] drm/tegra: Fix shift overflow in
 tegra_shared_plane_atomic_update

On Thu, Apr 15, 2021 at 08:29:14AM -0700, Nathan Chancellor wrote:
> Clang warns:
> 
> drivers/gpu/drm/tegra/hub.c:513:11: warning: shift count >= width of
> type [-Wshift-count-overflow]
>                 base |= BIT(39);
>                         ^~~~~~~
> 
> BIT is unsigned long, which is 32-bit on ARCH=arm, hence the overflow
> warning. Switch to BIT_ULL, which is 64-bit and will not overflow.
> 
> Fixes: 7b6f846785f4 ("drm/tegra: Support sector layout on Tegra194")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1351
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
> ---
>  drivers/gpu/drm/tegra/hub.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This code never runs on 32-bit platforms, so another option would be to
not try and build this on 32-bit configurations either. But none of the
rest of the code is built conditionally, so fixing this is preferable.

Applied, thanks.

Thierry

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ