From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754070AbdHWMsU (ORCPT ); Wed, 23 Aug 2017 08:48:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48244 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753944AbdHWMsT (ORCPT ); Wed, 23 Aug 2017 08:48:19 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D96D0883B1 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jpoimboe@redhat.com Date: Wed, 23 Aug 2017 07:48:17 -0500 From: Josh Poimboeuf To: Arnd Bergmann Cc: Linux Kernel Mailing List Subject: Re: gcc-8 objtool warnings Message-ID: <20170823124817.l3ersdabah75ampl@treble> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 23 Aug 2017 12:48:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 : > 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 > 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 > 3b8: R_X86_64_PC32 .text.unlikely-0x4 > > ... > > 0000000000000000 : > 0: e8 00 00 00 00 callq 5 > 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