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: <20210825053030.kal3nk3ifaj55vtu@treble>
Date:   Tue, 24 Aug 2021 22:30:30 -0700
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Sami Tolvanen <samitolvanen@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        clang-built-linux@...glegroups.com, llvm@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: objtool warning in cfg80211_edmg_chandef_valid() with ThinLTO

On Tue, Aug 24, 2021 at 02:19:07PM -0700, Nathan Chancellor wrote:
> On 8/24/2021 2:05 PM, Peter Zijlstra wrote:
> > On Tue, Aug 24, 2021 at 01:08:58PM -0700, Nathan Chancellor wrote:
> > 
> > > The LLVM developers are under the impression that this is an issue with
> > > objtool; specifically quoting Eli Friedman:
> > > 
> > > "The backend can, in general, create basic blocks that don't contain any
> > > instructions, and don't fall through to another block. A jump table entry
> > > can refer to such a block. I guess certain tools could be confused by this.
> > > 
> > > If that's the issue, it should be possible to work around it using '-mllvm
> > > -trap-unreachable'."
> > 
> > So jump-tables are a weak point; ARM64 was having worse problems than
> > x86 there, they can't even locate them.
> > 
> > As to having a jump-table entry to an empty block and not falling
> > through; how are we supposed to know?
> 
> Fair enough. It does make me wonder why LLVM does that.
> 
> > Emitting them is a waste of space, so I'd say it's a compiler bug :-))
> 
> Isn't it always? :)
> 
> Turns out Nick brought up an issue very similar to this (unreachable
> conditions with switches) on LLVM's issue tracker
> (https://bugs.llvm.org/show_bug.cgi?id=50080) with the same workaround
> suggestion ('-mllvm -trap-unreachable') and there was no follow up after
> that so maybe that is one thing to look into once Nick is back online.
> 
> > It's been brought up before; but perhaps we should look at an 'informal'
> > ABI for jump-tables ?
> Not a bad idea, especially if this has come up before.

This is definitely needed.  Jump tables have always been a major thorn
in objtool's side.  I think I volunteered to write up a proposal for the
linux-toolchains list but I've just been waaay too busy.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ