mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	Kees Cook <keescook@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Craig Topper <craig.topper@intel.com>,
	Alexander Potapenko <glider@google.com>,
	Bill Wendling <morbo@google.com>,
	Stephen Hines <srhines@google.com>
Subject: Re: objtool warnings in prerelease clang-9
Date: Tue, 2 Jul 2019 23:58:27 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1907022332000.1802@nanos.tec.linutronix.de> (raw)
In-Reply-To: <CAKwvOdnGL_9cJ+ETNce89+z7CTDctjACS8DFsLu=ev4+vkVkUw@mail.gmail.com>

Nick,

On Tue, 2 Jul 2019, Nick Desaulniers wrote:

> TL;DR
> LLVM currently has a bug when unrolling loops containing asm goto and
> we have a fix in hand.

<snip>

> 
> Conservatively, we can block loop unrolling when we see asm goto in a loop:

Makes sense in order to make progress.

> This causes objtool to not find any issues in
> arch/x86/kernel/cpu/mtrr/generic.o.  I don't observe any duplication
> in the __jump_table section of the resulting .o file.  It also cuts
> down the objtool warnings I observe in a defconfig (listed at the
> beginning of the email) from 4 to 2. (platform-quirks.o predates asm
> goto,

It does not have asm goto inside :)

> i915_gem_execbuffer.o is likely a separate bug).

platform-quirks.o:

        if (x86_platform.set_legacy_features)
  74:   4c 8b 1d 00 00 00 00    mov    0x0(%rip),%r11        # 7b <x86_early_init_platform_quirks+0x7b>
  7b:   4d 85 db                test   %r11,%r11
  7e:   0f 85 00 00 00 00       jne    84 <x86_early_init_platform_quirks+0x84>
                x86_platform.set_legacy_features();
}
  84:   c3                      retq   

That jne jumps to __x86_indirect_thunk_r11, aka. ratpoutine.

No idea why objtool thinks that the instruction at 0x84 is not
reachable. Josh?

Thanks,

	tglx




  reply	other threads:[~2019-07-03  1:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02 20:53 Nick Desaulniers
2019-07-02 21:58 ` Thomas Gleixner [this message]
2019-07-02 22:09   ` Nick Desaulniers
2019-07-02 22:20     ` Thomas Gleixner
2019-07-02 22:33       ` Nick Desaulniers
2019-07-06 15:50   ` Josh Poimboeuf
2019-07-10 23:22     ` Josh Poimboeuf
2019-07-10 23:42       ` Nick Desaulniers
2019-07-11  0:04         ` Josh Poimboeuf
2019-07-02 22:07 ` Peter Zijlstra
2019-07-03  0:30   ` Nick Desaulniers

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=alpine.DEB.2.21.1907022332000.1802@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=craig.topper@intel.com \
    --cc=glider@google.com \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=morbo@google.com \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=srhines@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®