[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200429220151.GA1642005@rani.riverdale.lan>
Date: Wed, 29 Apr 2020 18:01:51 -0400
From: Arvind Sankar <nivedita@...m.mit.edu>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: x86@...nel.org, tglx@...utronix.de, linux-kernel@...r.kernel.org,
mingo@...nel.org, hpa@...or.com, ast@...nel.org,
peterz@...radead.org, rdunlap@...radead.org,
Arnd Bergmann <arnd@...db.de>
Subject: Re: BPF vs objtool again
On Wed, Apr 29, 2020 at 04:51:59PM -0500, Josh Poimboeuf wrote:
> On Thu, Jul 18, 2019 at 12:14:08PM -0700, tip-bot for Josh Poimboeuf wrote:
> > Commit-ID: 3193c0836f203a91bef96d88c64cccf0be090d9c
> > Gitweb: https://git.kernel.org/tip/3193c0836f203a91bef96d88c64cccf0be090d9c
> > Author: Josh Poimboeuf <jpoimboe@...hat.com>
> > AuthorDate: Wed, 17 Jul 2019 20:36:45 -0500
> > Committer: Thomas Gleixner <tglx@...utronix.de>
> > CommitDate: Thu, 18 Jul 2019 21:01:06 +0200
> >
> > bpf: Disable GCC -fgcse optimization for ___bpf_prog_run()
>
> For some reason, this
>
> __attribute__((optimize("-fno-gcse")))
>
> is disabling frame pointers in ___bpf_prog_run(). If you compile with
> CONFIG_FRAME_POINTER it'll show something like:
>
> kernel/bpf/core.o: warning: objtool: ___bpf_prog_run.cold()+0x7: call without frame pointer save/setup
>
> Also, since GCC 9.1, the GCC docs say "The optimize attribute should be
> used for debugging purposes only. It is not suitable in production
> code." That doesn't sound too promising.
>
It turns out that the optimize attribute doesn't append options to the
command-line arguments, it starts from the defaults and only adds
whatever you specify in the attribute. So it's not very useful for
production code.
See this for eg where the same thing came up in a different context.
https://lore.kernel.org/lkml/alpine.LSU.2.21.2004151445520.11688@wotan.suse.de/
Powered by blists - more mailing lists