[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190916183916.y4jkgkxogpus7sio@treble>
Date: Mon, 16 Sep 2019 13:39:16 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Borislav Petkov <bp@...en8.de>
Cc: x86-ml <x86@...nel.org>, lkml <linux-kernel@...r.kernel.org>
Subject: Re: warning: objtool: mce_panic()+0x11b: unreachable instruction
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
Powered by blists - more mailing lists