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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 24 Dec 2020 14:28:07 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Dave Airlie <airlied@...il.com>, Josip Pavic <Josip.Pavic@....com>,
        Bindu Ramamurthy <bindu.r@....com>,
        Alex Deucher <alexander.deucher@....com>
Cc:     Daniel Vetter <daniel.vetter@...ll.ch>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [git pull] drm fixes for 5.11-rc1

On Wed, Dec 23, 2020 at 6:29 PM Dave Airlie <airlied@...il.com> wrote:
>
> Xmas eve pull request present. Just some fixes that trickled in this
> past week. Mostly amdgpu fixes, with a dma-buf/mips build fix and some
> misc komeda fixes.

Well, I already pulled and pushed out my merge, but only noticed
afterwards that clang complains about this, and I think it's a real
bug:

  drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_mpc.c:475:6: warning:
     variable 'val' is used uninitialized whenever 'if' condition is
false [-Wsometimes-uninitialized]

and it sure is true: the code literally does

        uint32_t val;

        if (opp_id < MAX_OPP && REG(MUX[opp_id]))
                REG_GET(MUX[opp_id], MPC_OUT_MUX, &val);

        return val;

so clearly 'val' isn't initialized if that if-statement isn't true.

I assume 'opp_id' is always presumed to be valid, but that code really
is disgusting.

Just make it return 0 (or whatever) for invalid, possibly together
with a WARN_ON_ONCE(). Ok?

             Linus

Powered by blists - more mailing lists