From patchwork Mon Oct 2 21:26:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Poimboeuf X-Patchwork-Id: 9981267 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 094DC60365 for ; Mon, 2 Oct 2017 21:27:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EED4628845 for ; Mon, 2 Oct 2017 21:27:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3CDC28870; Mon, 2 Oct 2017 21:27:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A31DC28845 for ; Mon, 2 Oct 2017 21:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ITAus1mqR/RYYHMMeOb9vuy1w6Tvemf908WIysvVik4=; b=a9nxyOix7SQ6eC rcfX8/jFLg69Q7sR7ZVu7vG/pyR9BNh0C110NspY62KtU93jX9oR68m+rkbYxaXtYq3EYADpl9oEO QgiC0C1hLoBpyNT4bKCDIijGeL3T5zufFkMgBYDP62PMVgt3IE5iuz0lf6Fh3P1MwRy7LDmPsE+sI 8azEZESTC5fMixF5HAuOysXPYW+lUzWLclOLXBcph8SSvX9k9kcpXU9408Yp7ateImxZJXBVs8xMg NlJU2mzKkb8gw0ASEZOoCQZCLs7QyLUvsLvMFvvK4LNHw2R2KBDo1ZOyaPW45oa5+26huD/i9nz1i DOlr2SuvL5u6T6/AM4vA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dz8FI-0001dU-Cf; Mon, 02 Oct 2017 21:27:24 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dz8FE-0001Z1-DE for linux-arm-kernel@lists.infradead.org; Mon, 02 Oct 2017 21:27:22 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 49D3B821C3; Mon, 2 Oct 2017 21:26:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 49D3B821C3 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jpoimboe@redhat.com Received: from treble (ovpn-120-76.rdu2.redhat.com [10.10.120.76]) by smtp.corp.redhat.com (Postfix) with SMTP id CE0205D723; Mon, 2 Oct 2017 21:26:54 +0000 (UTC) Date: Mon, 2 Oct 2017 16:26:54 -0500 From: Josh Poimboeuf To: Linus Torvalds Subject: Re: 4879b7ae05 ("Merge tag 'dmaengine-4.12-rc1' of .."): WARNING: kernel stack regs at bd92bc2e in 01-cpu-hotplug:3811 has bad 'bp' value 000001be Message-ID: <20171002212654.rsm4uj3hfioddldd@treble> References: <59d177a7.vsiddgOxdHRIlRvy%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 02 Oct 2017 21:26:59 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171002_142720_502151_1DEB3229 X-CRM114-Status: GOOD ( 16.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "devicetree@vger.kernel.org" , linux-samsung-soc@vger.kernel.org, Vinod Koul , LKP , USB list , LKML , wfg@linux.intel.com, linux-arm-msm@vger.kernel.org, dma , kernel test robot , linux-soc@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Oct 02, 2017 at 01:09:31PM -0700, Linus Torvalds wrote: > Bringing in Josh on this, because the merge commit gets fingered > because it seems to be an interaction between the new code from the > merge and the ORC unwinder changes. It's probably some almost trivial > code difference that just causes some code generation to change. > > And because Josh wasn't implicated in the merge, he didn't get cc'd by > the kernel test robot. > > Of course, the stack trace itself seems to be pretty useless, since > that randconfig doesn't have KALLSYMS enabled, so it's just random hex > numbers. > > Josh, original email on lkml and a few other mailing lists, see for example: > > https://www.spinics.net/lists/devicetree/msg196692.html > > Any ideas? The bisect is pointing to a commit which is almost 5 months old, so this is pre-ORC. Kallsyms *is* enabled, but the unwinder dump isn't smart enough to realize it's dumping misaligned stack addresses: [ 110.399425] WARNING: kernel stack regs at bd92bc2e in 01-cpu-hotplug:3811 has bad 'bp' value 000001be [ 110.399428] unwind stack type:0 next_sp: (null) mask:0x2 graph_idx:0 [ 110.399431] bd92bc2e: 92bc7f00 (0x92bc7f00) [ 110.399433] bd92bc32: c27041bd (0xc27041bd) So kallsyms doesn't help if I'm dumping bad data. Oops. I tried to recreate it with the reproducer script and a similar GCC version, but no luck. Fengguang, assuming it's reliably recreatable, any chance you could recreate with the following patch? diff --git a/arch/x86/kernel/unwind_frame.c b/arch/x86/kernel/unwind_frame.c index 82c6d7f1fd73..64282ec73eb8 100644 --- a/arch/x86/kernel/unwind_frame.c +++ b/arch/x86/kernel/unwind_frame.c @@ -42,7 +42,7 @@ static void unwind_dump(struct unwind_state *state) state->stack_info.type, state->stack_info.next_sp, state->stack_mask, state->graph_idx); - for (sp = state->orig_sp; sp; sp = PTR_ALIGN(stack_info.next_sp, sizeof(long))) { + for (sp = PTR_ALIGN(state->orig_sp); sp; sp = PTR_ALIGN(stack_info.next_sp, sizeof(long))) { if (get_stack_info(sp, state->task, &stack_info, &visit_mask)) break;