All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Sami Tolvanen <samitolvanen@google.com>,
	Kees Cook <keescook@chromium.org>,
	clang-built-linux@googlegroups.com, llvm@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: objtool warning in cfg80211_edmg_chandef_valid() with ThinLTO
Date: Tue, 24 Aug 2021 23:05:07 +0200	[thread overview]
Message-ID: <20210824210507.GC17784@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <5913cdf4-9c8e-38f8-8914-d3b8a3565d73@kernel.org>

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? Emitting them is a waste of space,
so I'd say it's a compiler bug :-))

It's been brought up before; but perhaps we should look at an 'informal'
ABI for jump-tables ?

  reply	other threads:[~2021-08-24 21:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 20:08 objtool warning in cfg80211_edmg_chandef_valid() with ThinLTO Nathan Chancellor
2021-08-24 21:05 ` Peter Zijlstra [this message]
2021-08-24 21:19   ` Nathan Chancellor
2021-08-25  5:30     ` Josh Poimboeuf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210824210507.GC17784@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=samitolvanen@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.