Re: linux-next: Tree for Jul 2 (objtool)

From: Josh Poimboeuf
Date: Wed Jul 03 2019 - 17:04:00 EST


On Wed, Jul 03, 2019 at 02:46:14PM -0500, Josh Poimboeuf wrote:
> On Wed, Jul 03, 2019 at 02:45:28PM -0500, Josh Poimboeuf wrote:
> > On Wed, Jul 03, 2019 at 10:23:21AM -0700, Randy Dunlap wrote:
> > > On 7/3/19 9:44 AM, Josh Poimboeuf wrote:
> > > > On Tue, Jul 02, 2019 at 11:47:02AM -0700, Randy Dunlap wrote:
> > > >> On 7/2/19 2:51 AM, Stephen Rothwell wrote:
> > > >>> Hi all,
> > > >>>
> > > >>> Changes since 20190701:
> > > >>>
> > > >>
> > > >> on x86_64:
> > > >>
> > > >> kernel/bpf/core.o: warning: objtool: ___bpf_prog_run()+0x22: can't find switch jump table
> > > >
> > > > I don't see it on current linux-next/master. Can you share the config
> > > > and .o?
> > > >
> > >
> > > This warning happened in 6 of 10 builds for 20190702.
> > >
> > > Today (20190703) I don't see it at all, but I see this instead:
> > > kernel/bpf/core.o: warning: objtool: ___bpf_prog_run()+0xa3: sibling call from callable instruction with modified stack frame
> > >
> > > Kernel (rand)config file and .o file for 20190702 are attached.
> >
> > Thanks, I'm able to recreate the sibling call warning with a randconfig
> > on today's linux-next.
> >
> > GCC is doing some funky stuff. With my randconfig, ___bpf_prog_run()
> > has 166 indirect calls to its jump table. Seems (a bit!) excessive.
>
> s/calls/jumps/ obviously
>
> >
> > I'll need to look into it.

Hm, it looks like disabling CONFIG_RETPOLINE causes GCC to produce
vastly different code here. Without retpolines, it's not shy at all
about indirect jumps.

--
Josh