BPF List
 help / color / mirror / Atom feed
* kernel/bpf/core.o: warning: objtool: ___bpf_prog_run.cold()+0x7: call without frame pointer save/setup
@ 2019-08-26 14:42 He Zhe
  2019-08-26 15:11 ` Greg KH
  2019-08-26 15:18 ` Josh Poimboeuf
  0 siblings, 2 replies; 4+ messages in thread
From: He Zhe @ 2019-08-26 14:42 UTC (permalink / raw)
  To: ast, daniel, kafai, songliubraving, yhs, ndesaulniers,
	miguel.ojeda.sandonis, luc.vanoostenryck, schwidefsky, gregkh,
	mst, gor, andreyknvl, jpoimboe, liuxiaozhou, yamada.masahiro,
	linux-kernel, netdev, bpf, He Zhe

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


Zhe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: kernel/bpf/core.o: warning: objtool: ___bpf_prog_run.cold()+0x7: call without frame pointer save/setup
  2019-08-26 14:42 kernel/bpf/core.o: warning: objtool: ___bpf_prog_run.cold()+0x7: call without frame pointer save/setup He Zhe
@ 2019-08-26 15:11 ` Greg KH
  2019-08-26 15:18 ` Josh Poimboeuf
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2019-08-26 15:11 UTC (permalink / raw)
  To: He Zhe
  Cc: ast, daniel, kafai, songliubraving, yhs, ndesaulniers,
	miguel.ojeda.sandonis, luc.vanoostenryck, schwidefsky, mst, gor,
	andreyknvl, jpoimboe, liuxiaozhou, yamada.masahiro, linux-kernel,
	netdev, bpf

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

Do you see this same problem on 5.3-rc6?

And what version of gcc are you using?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: kernel/bpf/core.o: warning: objtool: ___bpf_prog_run.cold()+0x7: call without frame pointer save/setup
  2019-08-26 14:42 kernel/bpf/core.o: warning: objtool: ___bpf_prog_run.cold()+0x7: call without frame pointer save/setup He Zhe
  2019-08-26 15:11 ` Greg KH
@ 2019-08-26 15:18 ` Josh Poimboeuf
       [not found]   ` <2c416fe7-f6be-440b-b476-9fede1ea123c@windriver.com>
  1 sibling, 1 reply; 4+ messages in thread
From: Josh Poimboeuf @ 2019-08-26 15:18 UTC (permalink / raw)
  To: He Zhe
  Cc: ast, daniel, kafai, songliubraving, yhs, ndesaulniers,
	miguel.ojeda.sandonis, luc.vanoostenryck, schwidefsky, gregkh,
	mst, gor, andreyknvl, liuxiaozhou, yamada.masahiro, linux-kernel,
	netdev, bpf

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

The following would also be helpful for me to try to recreate it:

- config file
- compiler version
- kernel version

-- 
Josh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: kernel/bpf/core.o: warning: objtool: ___bpf_prog_run.cold()+0x7: call without frame pointer save/setup
       [not found]   ` <2c416fe7-f6be-440b-b476-9fede1ea123c@windriver.com>
@ 2019-08-27 14:58     ` Josh Poimboeuf
  0 siblings, 0 replies; 4+ messages in thread
From: Josh Poimboeuf @ 2019-08-27 14:58 UTC (permalink / raw)
  To: He Zhe
  Cc: ast, daniel, kafai, songliubraving, yhs, ndesaulniers,
	miguel.ojeda.sandonis, luc.vanoostenryck, schwidefsky, gregkh,
	mst, gor, andreyknvl, liuxiaozhou, yamada.masahiro, linux-kernel,
	netdev, bpf

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-27 14:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-26 14:42 kernel/bpf/core.o: warning: objtool: ___bpf_prog_run.cold()+0x7: call without frame pointer save/setup He Zhe
2019-08-26 15:11 ` Greg KH
2019-08-26 15:18 ` Josh Poimboeuf
     [not found]   ` <2c416fe7-f6be-440b-b476-9fede1ea123c@windriver.com>
2019-08-27 14:58     ` Josh Poimboeuf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox