mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: gcc-8 objtool warnings
Date: Wed, 23 Aug 2017 07:48:17 -0500	[thread overview]
Message-ID: <20170823124817.l3ersdabah75ampl@treble> (raw)
In-Reply-To: <CAK8P3a2OcobZ0FS8jMcnwoCPYW=05wsH627uR_9hWyzYAT0zCw@mail.gmail.com>

On Wed, Aug 23, 2017 at 02:22:34PM +0200, Arnd Bergmann wrote:
> Hi Josh,
> 
> I upgraded the compiler to gcc-8.0.0 (from earlier this week) and into one
>  configuration that produces countless objtool warnings, starting with
> 
> kernel/panic.o: warning: objtool: nmi_panic()+0x31: sibling call from
> callable instruction with modified stack frame
> kernel/panic.o: warning: objtool: __warn()+0x26: sibling call from
> callable instruction with modified stack frame
> kernel/panic.o: warning: objtool: nmi_panic.cold.0()+0x0: call without
> frame pointer save/setup
> kernel/panic.o: warning: objtool: __warn.cold.1()+0x0: call without
> frame pointer save/setup
> arch/x86/kernel/irq_64.o: warning: objtool: handle_irq()+0x8a: sibling
> call from callable instruction with modified stack frame
> arch/x86/kernel/dumpstack.o: warning: objtool: oops_end()+0x83:
> sibling call from callable instruction with modified stack frame
> kernel/exit.o: warning: objtool: do_exit()+0x39: sibling call from
> callable instruction with modified stack frame
> kernel/exit.o: warning: objtool: do_exit.cold.1()+0x0: call without
> frame pointer save/setup
> kernel/cred.o: warning: objtool: put_cred_rcu()+0x26: sibling call
> from callable instruction with modified stack frame
> kernel/cred.o: warning: objtool: put_cred_rcu.cold.1()+0x0: call
> without frame pointer save/setup
> mm/oom_kill.o: warning: objtool: oom_kill_process.isra.4()+0xfe:
> sibling call from callable instruction with modified stack frame
> mm/oom_kill.o: warning: objtool: out_of_memory()+0x556: sibling call
> from callable instruction with modified stack frame
> mm/oom_kill.o: warning: objtool: oom_kill_process.isra.4.cold.5()+0x0:
> call without frame pointer save/setup
> mm/oom_kill.o: warning: objtool: out_of_memory.cold.6()+0x0: call
> without frame pointer save/setup
> mm/page_alloc.o: warning: objtool: warn_alloc()+0x2f: sibling call
> from callable instruction with modified stack frame
> mm/page_alloc.o: warning: objtool: warn_alloc.cold.20()+0x9: call
> without frame pointer save/setup
> arch/x86/kernel/apic/io_apic.o: warning: objtool: mp_save_irq()+0x6c:
> sibling call from callable instruction with modified stack frame
> 
> See https://pastebin.com/1EehhrcP for the .config file.
> 
> I looked at a few examples, and they all seem to involve calling panic()
> at the end of a a function in .text.unlikely, e.g.
> 
> 0000000000000390 <put_cred_rcu>:
>  390:   55                      push   %rbp
>  391:   48 89 e5                mov    %rsp,%rbp
>  394:   41 55                   push   %r13
>  396:   41 54                   push   %r12
>  398:   53                      push   %rbx
>  399:   48 89 fb                mov    %rdi,%rbx
>  39c:   4c 8d ab 60 ff ff ff    lea    -0xa0(%rbx),%r13
>  3a3:   e8 00 00 00 00          callq  3a8 <put_cred_rcu+0x18>
>                         3a4: R_X86_64_PC32      __sanitizer_cov_trace_pc-0x4
>  3a8:   44 8b a3 70 ff ff ff    mov    -0x90(%rbx),%r12d
>  3af:   41 81 fc 44 61 65 44    cmp    $0x44656144,%r12d
>  3b6:   0f 85 00 00 00 00       jne    3bc <put_cred_rcu+0x2c>
>                         3b8: R_X86_64_PC32      .text.unlikely-0x4
> 
> ...
> 
> 0000000000000000 <put_cred_rcu.cold.1>:
>    0:   e8 00 00 00 00          callq  5 <put_cred_rcu.cold.1+0x5>
>                         1: R_X86_64_PC32        __sanitizer_cov_trace_pc-0x4
>    5:   44 8b 8b 64 ff ff ff    mov    -0x9c(%rbx),%r9d
>    c:   48 8b 8b 68 ff ff ff    mov    -0x98(%rbx),%rcx
>   13:   44 89 e2                mov    %r12d,%edx
>   16:   44 8b 83 60 ff ff ff    mov    -0xa0(%rbx),%r8d
>   1d:   4c 89 ee                mov    %r13,%rsi
>   20:   48 c7 c7 00 00 00 00    mov    $0x0,%rdi
>                         23: R_X86_64_32S        .rodata.str1.8+0x28
>   27:   e8 00 00 00 00          callq  2c <__kstrtab_creds_are_invalid+0x3>
>                         28: R_X86_64_PC32       panic-0x4

Thanks.  Can you send me one of the .o files?

-- 
Josh

  reply	other threads:[~2017-08-23 12:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 12:22 Arnd Bergmann
2017-08-23 12:48 ` Josh Poimboeuf [this message]
2017-08-23 13:38   ` Arnd Bergmann
2017-08-23 16:01     ` Josh Poimboeuf
2017-08-24 10:14       ` Arnd Bergmann
2017-08-24 19:19         ` Josh Poimboeuf
2017-08-24 21:14           ` Arnd Bergmann
2017-09-11 14:34           ` Arnd Bergmann
2017-09-19 19:52             ` Josh Poimboeuf
2017-09-19 20:43               ` Arnd Bergmann
2017-09-19 21:39                 ` Josh Poimboeuf
2017-09-21 13:27                   ` Arnd Bergmann

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=20170823124817.l3ersdabah75ampl@treble \
    --to=jpoimboe@redhat.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®