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: <CAKwvOdmq3VRLt+SUM=Do7OqasLqzoj4R00-JZGBWFjj8TccNgQ@mail.gmail.com>
Date:   Tue, 27 Aug 2019 15:50:44 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     Leon Romanovsky <leon@...nel.org>,
        Nathan Chancellor <natechancellor@...il.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Bernard Metzler <BMT@...ich.ibm.com>,
        Doug Ledford <dledford@...hat.com>, linux-rdma@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] rdma/siw: Use proper enumerated type in map_cqe_status

On Tue, Aug 27, 2019 at 2:27 PM Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
>
> On Tue, Aug 27, 2019 at 12:23 PM Josh Poimboeuf <jpoimboe@...hat.com> wrote:
> >
> > On Tue, Aug 27, 2019 at 08:00:18PM +0300, Leon Romanovsky wrote:
> > > On Tue, Aug 27, 2019 at 10:08:30AM -0500, Josh Poimboeuf wrote:
> > > > On Mon, Aug 26, 2019 at 04:38:29PM -0700, Nathan Chancellor wrote:
> > > > > Looks like that comes from tune_qsfp, which gets inlined into
> > > > > tune_serdes but I am far from an objtool expert so I am not
> > > > > really sure what kind of issues I am looking for. Adding Josh
> > > > > and Peter for a little more visibility.
> > > > >
> > > > > Here is the original .o file as well:
> > > > >
> > > > > https://github.com/nathanchance/creduce-files/raw/4e252c0ca19742c90be1445e6c722a43ae561144/rdma-objtool/platform.o.orig
> > > >
> > > >      574:       0f 87 00 0c 00 00       ja     117a <tune_serdes+0xdfa>
> > > >
> > > > It's jumping to la-la-land past the end of the function.
> > >
> > > How is it possible?
> >
> > Looks like a compiler bug.
>
> Nathan,
> Thanks for the reduced test case.  I modified it slightly:
> https://godbolt.org/z/15xejg
>
> You can see that the label LBB0_5 seemingly points off into space.
> Let me play with this one more a bit, then I will file a bug and
> report back.

Something funny going on in one of the earliest optimizations.  Seems
related to an analysis that's deducing that the case statement is
exhaustive (so the GNU C case range is unrelated), but it's keeping
the default case and its comparison around.  The analysis is correct;
the value should never be > 0xF so there shouldn't be any runtime
bugs, but this would avoid an unnecessary comparison for exhaustive
switch statements and save a few bytes of object code in such cases.

Filed: https://bugs.llvm.org/show_bug.cgi?id=43129
-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ