Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5662379ybl; Tue, 27 Aug 2019 08:00:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqygPasyMgAV++MfvVgvL2mg/Q5kPxqdWITkUXYFr4082SNsoDP+XjeIWEG2pp6NPVZR+2XN X-Received: by 2002:a62:64d4:: with SMTP id y203mr26348942pfb.91.1566918020329; Tue, 27 Aug 2019 08:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566918020; cv=none; d=google.com; s=arc-20160816; b=BBEm+isAjEHV2oXqXs4pMaQAeY/2MghBz+0sHtqmioLs2+ZeCJ7MdJ72k+Jl4+xsNF 7+s0mHSma0nhlohYsT82jH0XILY39mwvRc1ZH52XGn/QiTINc3D9s4kLbr2jDhehvtPX GDyjRvlP9oNX75cZH2eWDmHXlx5klMwTJWrpQ0Ho7TUTNFOK/w/gIcBHsJGD99b3uAZP 2Q5hWrQlWt8ro8iKnc9q058Ihkc50pCUqiCmAlW8pdVsgENDWQk6AQl6mzE+eJ/lCORD atb/EBcpUcdUj2JK5j9p4jQo950Jyrws3dYx6qVnQQhw0gkEvcJY5oHms9u1b+0bcpJ4 HdXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=hbJOe4d9sjwK7omVUZNCm7Bum86lgb+7wftJS3XJM1w=; b=qgq/96CrrWOeL77ivi7QI1xnBzix5FOrtC9ZhbRlwHBCjOStv0Nj9jE+Y2WMqFOeix 0xe10rLmiYmPPOgrPl2lJD+ME5dDqoxF09nIInZF2+i9XauBbnB1JXi9jwvtB1Sf+5V6 VYOq05228UBm4RGNZ4x5PKqtAY5VueP3PxfkkifRr+V2aHqvcZxSw5yZ2KxmvAudDshh cJl8gcuA5qyoJFyZt3CYKzsyDrCSKvbrzMkiHGX5B0dqZn4IIdKHOTWxaUGfBUVQZTgT 7nnU9qufExGq+OlWOHzsBVS8AN9OHCF64ZZ9fbJKuyabOAsrzI3dGu15u59EoF0ZIeQr dP1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si2950642pjq.31.2019.08.27.08.00.03; Tue, 27 Aug 2019 08:00:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730123AbfH0O6t (ORCPT + 99 others); Tue, 27 Aug 2019 10:58:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57596 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728670AbfH0O6t (ORCPT ); Tue, 27 Aug 2019 10:58:49 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DCAAE7BDB6; Tue, 27 Aug 2019 14:58:48 +0000 (UTC) Received: from treble (ovpn-121-55.rdu2.redhat.com [10.10.121.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CE16F5D70D; Tue, 27 Aug 2019 14:58:41 +0000 (UTC) Date: Tue, 27 Aug 2019 09:58:39 -0500 From: Josh Poimboeuf To: He Zhe Cc: ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, ndesaulniers@google.com, miguel.ojeda.sandonis@gmail.com, luc.vanoostenryck@gmail.com, schwidefsky@de.ibm.com, gregkh@linuxfoundation.org, mst@redhat.com, gor@linux.ibm.com, andreyknvl@google.com, liuxiaozhou@bytedance.com, yamada.masahiro@socionext.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: kernel/bpf/core.o: warning: objtool: ___bpf_prog_run.cold()+0x7: call without frame pointer save/setup Message-ID: <20190827145839.dsm6at6hp7rwwrjo@treble> References: <20190826151808.upis57cckcpf2new@treble> <2c416fe7-f6be-440b-b476-9fede1ea123c@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2c416fe7-f6be-440b-b476-9fede1ea123c@windriver.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 27 Aug 2019 14:58:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 27, 2019 at 10:43:27AM +0800, He Zhe wrote: > > > On 8/26/19 11:18 PM, Josh Poimboeuf wrote: > > On Mon, Aug 26, 2019 at 10:42:53PM +0800, He Zhe wrote: > >> Hi All, > >> > >> Since 3193c0836f20 ("bpf: Disable GCC -fgcse optimization for ___bpf_prog_run()"), > >> We have got the following warning, > >> kernel/bpf/core.o: warning: objtool: ___bpf_prog_run.cold()+0x7: call without frame pointer save/setup > >> > >> If reverting the above commit, we will get the following warning, > >> kernel/bpf/core.o: warning: objtool: ___bpf_prog_run()+0x8b9: sibling call from callable instruction with modified stack frame > >> if CONFIG_RETPOLINE=n, and no warning if CONFIG_RETPOLINE=y > > Can you please share the following: > > > > - core.o file > > Attached. > > > > > The following would also be helpful for me to try to recreate it: > > > > - config file > > - compiler version > > - kernel version > > I pasted them in the other reply. Thanks. I was able to recreate. I reduced it to: void a(b); __attribute__((optimize(""))) c(void) { a(); } Apparently '__attribute__((optimize()))' is overwriting GCC cmdline flags, including -fno-omit-frame-pointer. I had assumed it would append instead of replace. I'm guessing this is a GCC "feature" instead of a bug. I'll need to follow up. -- Josh