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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wgiPxXzRNnfaXk7ozSWSu7fFU--kTmVjkDaTB05wwUk_g@mail.gmail.com>
Date:   Sun, 21 Feb 2021 15:07:17 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Dave Airlie <airlied@...il.com>, Kevin Wang <kevin1.wang@....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 for 5.12-rc1

On Thu, Feb 18, 2021 at 10:06 PM Dave Airlie <airlied@...il.com> wrote:
>
> Let me know if there are any issues,

gcc was happy, and I obviously already pushed out my merge, but then
when I did my clang build afterwards, it reports:

  drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:764:2: warning:
variable 'structure_size' is used uninitialized whenever switch
default is taken [-Wsometimes-uninitialized]
          default:
          ^~~~~~~
  drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:770:23: note:
uninitialized use occurs here
          memset(header, 0xFF, structure_size);
                               ^~~~~~~~~~~~~~

and clang is very very right. That "default" case is completely
broken, and will generate a randomly sized memset. Not good.

Presumably that default case never happens, but if so it shouldn't exist.

Perhaps better yet, make the "default" case just do a "return" instead
of a break. Breaking out of the switch statement to code that cannot
possibly work is all kinds of mindless.

Kevin/Alex? This was introduced by commit de4b7cd8cb87
("drm/amd/pm/swsmu: unify the init soft gpu metrics function")

              Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ