Re: v4.10: kernel stack frame pointer .. has bad value (null)

From: Josh Poimboeuf
Date: Thu Mar 02 2017 - 19:11:37 EST


On Fri, Feb 24, 2017 at 11:04:39PM -0600, Josh Poimboeuf wrote:
> On Thu, Feb 23, 2017 at 09:10:39PM +0100, Pavel Machek wrote:
> > Hi!
> >
> >
> > > > > > Somehow, startup_32_smp() is on the stack twice. The stack unwind led
> > > > > > to the startup_32_smp() frame at 0xf50cdf9c rather than the one at
> > > > > > 0xf50cdfa8 (which is where it should normally be). So the question is
> > > > > > how startup_32_smp() got executed the second time, with the wrong stack
> > > > > > offset.
> > > > >
> > > > > Not much idea... but this is stack dump, right? Just because some
> > > > > value is on the stack does not mean it is a return address, no?
> > > >
> > > > Right, but the one at 0xf50cdfa8 is where the startup_32_smp() is
> > > > *supposed* to be. If the unwinder had unwinded to that one, it wouldn't
> > > > have complained. So it looks to me like the CPU somehow booted twice:
> > > > the first time at the right stack address, and the second time it
> > > > somehow ended up with a different stack address.
> > > >
> > > > > And .... startup_32_smp is kind of "interesting" function. Take a
> > > > > look...
> > > >
> > > > Yes, it's used in bringing up the CPU.
> > >
> > > Can you share your .config?
> >
> > Here you go...
>
> What version of gcc are you using?
>
> Can you post a disassembly of the first 10 instructions of
> start_secondary()?

Pavel, ping? I'd like to try to get to the bottom of this issue soon.

I asked for the gcc version and the disassembly of start_secondary()
because I suspect gcc may have done a funky stack alignment prologue
which copies the return address on the stack a second time after
aligning it.

--
Josh