Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751588AbdCCALR (ORCPT ); Thu, 2 Mar 2017 19:11:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57508 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbdCCALO (ORCPT ); Thu, 2 Mar 2017 19:11:14 -0500 Date: Thu, 2 Mar 2017 17:45:14 -0600 From: Josh Poimboeuf To: Pavel Machek Cc: kernel list , 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) Message-ID: <20170302234514.3qcqdozibcltkdai@treble> References: <20170221221418.GA6918@amd> <20170221231216.y56gb62vkn5ewgea@treble> <20170222210548.GC8467@amd> <20170222212103.tigzbw5sfrwd7uwh@treble> <20170222224755.GA4310@amd> <20170222225614.4z4z24uz6l2iz6qm@treble> <20170222231808.hmr6ulbvfnrg2at7@treble> <20170223201039.GB5177@amd> <20170225050439.7dplheb6nyne4nkm@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170225050439.7dplheb6nyne4nkm@treble> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 02 Mar 2017 23:45:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1680 Lines: 43 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