From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: kernel list <linux-kernel@vger.kernel.org>,
mingo@kernel.org, luto@kernel.org, bp@alien8.de,
brgerst@gmail.com, dvlasenk@redhat.com, hpa@zytor.com,
torvalds@linux-foundation.org, peterz@infradead.org,
tglx@linutronix.de
Subject: Re: v4.10: kernel stack frame pointer .. has bad value (null)
Date: Wed, 22 Feb 2017 16:56:14 -0600 [thread overview]
Message-ID: <20170222225614.4z4z24uz6l2iz6qm@treble> (raw)
In-Reply-To: <20170222224755.GA4310@amd>
On Wed, Feb 22, 2017 at 11:47:55PM +0100, Pavel Machek wrote:
> Hi!
>
> > > > > Thinkpad X220, in 32 bit mode... and I'm getting rather scary messages
> > > > > from kernel during boot:
> > > > >
> > > > > Git blame says that message comes from commit
> > > > >
> > > > > commit 24d86f59093b0bcb3756cdf47f2db10ff4e90dbb
> > > > > Author: Josh Poimboeuf <jpoimboe@redhat.com>
> > > > > Date: Thu Oct 27 08:10:58 2016 -0500
> > > > >
> > > > > x86/unwind: Ensure stack grows down
> > > > >
> > > > > Add a sanity check to ensure the stack only grows down, and print
> > > > > a
> > > > > warning if the check fails.
> > > > >
> > > > > Any ideas?
> > > >
> > > > I don't think I've seen this one. Any chance this came after resuming
> > > > from a hibernation or suspend?
> > >
> > > No, it was during the boot. Notice the timestamps...
> >
> > Right, but doesn't waking from hibernation initially start with a
> > timestamp of zero?
>
> Aha, ok, I guess so. Anyway... no hibernation was involved.
>
> > The reason I asked is because of the following part of the stack
> > dump:
>
> >
> > > > > [ 1.048429] f50cdf9c: 00000000c4000237 (startup_32_smp+0x16b/0x16d)
> > > > > [ 1.048429] f50cdfa0: 0000000000200002 (0x200002)
> > > > > [ 1.048430] f50cdfa4: 0000000000000000 ...
> > > > > [ 1.048432] f50cdfa8: 00000000c4000237 (startup_32_smp+0x16b/0x16d)
> > > > > [ 1.048432] f50cdfac: 0000000000000000 ...
> > > > > [ 1.048433] f50cdff4: 0000000000000100 (0x100)
> > > > > [ 1.048434] f50cdff8: 0000000000000200 (0x200)
> > > > > [ 1.048435] f50cdffc: 0000000000000000 ...
> > > > > [ 1.060368] [drm] Supports vblank timestamp caching Rev 2
> >
> > 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.
--
Josh
next prev parent reply other threads:[~2017-02-22 23:05 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 22:14 v4.10: kernel stack frame pointer .. has bad value (null) Pavel Machek
2017-02-21 23:12 ` Josh Poimboeuf
2017-02-21 23:15 ` H. Peter Anvin
2017-02-22 16:45 ` Josh Poimboeuf
2017-02-22 20:51 ` H. Peter Anvin
2017-02-22 21:15 ` Josh Poimboeuf
2017-02-22 21:05 ` Pavel Machek
2017-02-22 21:21 ` Josh Poimboeuf
2017-02-22 22:47 ` Pavel Machek
2017-02-22 22:56 ` Josh Poimboeuf [this message]
2017-02-22 23:18 ` Josh Poimboeuf
2017-02-23 20:10 ` Pavel Machek
2017-02-25 5:04 ` Josh Poimboeuf
2017-03-02 23:45 ` Josh Poimboeuf
2017-03-06 16:38 ` Pavel Machek
2017-03-07 17:38 ` Josh Poimboeuf
2017-03-07 17:52 ` Linus Torvalds
2017-03-07 17:59 ` Andy Lutomirski
2017-03-07 18:28 ` Josh Poimboeuf
2017-03-07 18:30 ` Josh Poimboeuf
2017-03-07 18:40 ` Linus Torvalds
2017-03-08 17:37 ` Josh Poimboeuf
2017-03-08 18:25 ` Linus Torvalds
2017-03-08 18:54 ` Andy Lutomirski
2017-03-08 21:22 ` Pavel Machek
2017-03-09 9:38 ` Geert Uytterhoeven
2017-03-09 10:56 ` Pavel Machek
2017-03-09 12:16 ` Geert Uytterhoeven
2017-03-10 13:17 ` Compiling kernels faster (was Re: v4.10: kernel stack frame pointer .. has bad value (null)) Pavel Machek
2017-03-10 13:28 ` Geert Uytterhoeven
2017-03-10 14:15 ` Willy Tarreau
2017-03-09 10:49 ` Old compiler versions " Pavel Machek
2017-03-09 18:05 ` Linus Torvalds
2017-03-09 15:29 ` v4.10: kernel stack frame pointer .. has bad value (null) Peter Zijlstra
2017-03-09 21:12 ` Pavel Machek
2017-03-08 21:29 ` Josh Poimboeuf
2017-03-09 14:14 ` Steven Rostedt
2017-03-09 18:31 ` Josh Poimboeuf
2017-03-16 15:42 ` [PATCH] x86: mostly disable '-maccumulate-outgoing-args' Josh Poimboeuf
2017-03-16 17:32 ` Steven Rostedt
2017-03-16 18:36 ` Josh Poimboeuf
2017-03-16 18:53 ` Josh Poimboeuf
2017-03-16 19:04 ` Josh Poimboeuf
2017-03-16 19:07 ` Steven Rostedt
2017-03-16 19:06 ` Steven Rostedt
2017-03-16 19:31 ` [PATCH v2] " Josh Poimboeuf
2017-03-22 7:51 ` Ingo Molnar
2017-03-22 15:48 ` Josh Poimboeuf
2017-03-28 8:13 ` [tip:x86/urgent] x86/build: Mostly " tip-bot for Josh Poimboeuf
2017-03-28 16:17 ` Josh Poimboeuf
2017-03-30 9:58 ` tip-bot for Josh Poimboeuf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170222225614.4z4z24uz6l2iz6qm@treble \
--to=jpoimboe@redhat.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).