linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Borislav Petkov <bp@alien8.de>
Cc: x86-ml <x86@kernel.org>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: warning: objtool: mce_panic()+0x11b: unreachable instruction
Date: Mon, 16 Sep 2019 13:39:16 -0500	[thread overview]
Message-ID: <20190916183916.y4jkgkxogpus7sio@treble> (raw)
In-Reply-To: <20190914124328.GC28054@zn.tnic>

On Sat, Sep 14, 2019 at 02:43:28PM +0200, Borislav Petkov wrote:
> Hey Josh,
> 
> I'm seeing
> 
> arch/x86/kernel/cpu/mce/core.o: warning: objtool: mce_panic()+0x11b: unreachable instruction
> 
> on a brand new debian install here with gcc9: gcc (Debian 9.2.1-4) 9.2.1 20190821
> 
> and thought should run it by you, you might've seen it already.
> 
> So mce_panic is at ffffffff8102f390, which makes the offset
> 0xffffffff8102f4ab and at that I have:
> 
>   ffffffff8102f497:       48 83 c4 08             add    $0x8,%rsp
>   ffffffff8102f49b:       5b                      pop    %rbx
>   ffffffff8102f49c:       5d                      pop    %rbp
>   ffffffff8102f49d:       41 5c                   pop    %r12
>   ffffffff8102f49f:       41 5d                   pop    %r13
>   ffffffff8102f4a1:       41 5e                   pop    %r14
>   ffffffff8102f4a3:       41 5f                   pop    %r15
>   ffffffff8102f4a5:       c3                      retq
> 
> <---
> 
>   ffffffff8102f4a6:       e8 b5 fe ff ff          callq  ffffffff8102f360 <wait_for_panic>
>   ffffffff8102f4ab:       e9 23 ff ff ff          jmpq   ffffffff8102f3d3 <mce_panic+0x43>
> 
>   ffffffff8102f4b0 <mce_timed_out>:
>   ffffffff8102f4b0:       e8 eb 21 7d 00          callq  ffffffff818016a0 <__fentry__>
>   ffffffff8102f4b5:       55                      push   %rbp
>   ffffffff8102f4b6:       48 89 f5                mov    %rsi,%rbp
>   ...

I'm guessing mce_panic() is effectively 'noreturn' because it calls
noreturn panic() instead of returning, and objtool has detected that.
Normally GCC also detects that, and doesn't insert instructions in the
path after the call.  So this could be a GCC issue.

Can you share the .o?  What code branch is this?

> Btw, I have a couple of those warnings on gcc9:
> 
> arch/x86/kernel/cpu/mce/core.o: warning: objtool: mce_panic()+0x11b: unreachable instruction
> kernel/exit.o: warning: objtool: __x64_sys_exit_group()+0x14: unreachable instruction
> fs/btrfs/extent_io.o: warning: objtool: __set_extent_bit.cold()+0xd: unreachable instruction
> fs/btrfs/relocation.o: warning: objtool: add_tree_block.isra.0.cold()+0xc: unreachable instruction
> net/core/skbuff.o: warning: objtool: skb_push.cold()+0x15: unreachable instruction

Some of these might have the same cause, though this particular warning
can have many different causes.

-- 
Josh

      reply	other threads:[~2019-09-16 18:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-14 12:43 warning: objtool: mce_panic()+0x11b: unreachable instruction Borislav Petkov
2019-09-16 18:39 ` Josh Poimboeuf [this message]

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=20190916183916.y4jkgkxogpus7sio@treble \
    --to=jpoimboe@redhat.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).