From patchwork Mon Nov 11 17:15:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Austin X-Patchwork-Id: 3168711 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9D6229F522 for ; Mon, 11 Nov 2013 17:16:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6AC5F201C0 for ; Mon, 11 Nov 2013 17:16:36 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0092520181 for ; Mon, 11 Nov 2013 17:16:34 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vfv6E-0007QB-LX; Mon, 11 Nov 2013 17:16:30 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vfv6C-0007DR-Dm; Mon, 11 Nov 2013 17:16:28 +0000 Received: from service87.mimecast.com ([91.220.42.44]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vfv69-0007Cj-HC for linux-arm-kernel@lists.infradead.org; Mon, 11 Nov 2013 17:16:26 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 11 Nov 2013 17:16:02 +0000 Received: from [10.1.199.161] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 11 Nov 2013 17:16:02 +0000 Message-ID: <528110B1.4060402@arm.com> Date: Mon, 11 Nov 2013 17:15:29 +0000 From: Jonathan Austin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: Ming Lei Subject: Re: kernel BUG at kernel/kallsyms.c:222! References: <1383789208.5970.1.camel@phoenix> <87zjpf4w0j.fsf@rustcorp.com.au> <87y54vzszo.fsf@rustcorp.com.au> In-Reply-To: X-OriginalArrivalTime: 11 Nov 2013 17:16:02.0087 (UTC) FILETIME=[B25F3B70:01CEDF01] X-MC-Unique: 113111117160203901 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131111_121625_732625_E6BE7BBD X-CRM114-Status: GOOD ( 16.55 ) X-Spam-Score: -2.6 (--) Cc: Michal Marek , Russell King , Rusty Russell , Linux Kernel Mailing List , =?UTF-8?B?VXdlIA==?= =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , Axel Lin , linux-arm-kernel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 11/11/13 10:41, Ming Lei wrote: > Hi, > > On Mon, Nov 11, 2013 at 5:57 PM, Ming Lei wrote: >> Hi, >> >> On Mon, Nov 11, 2013 at 4:37 PM, Axel Lin wrote: >>> 2013/11/11 Ming Lei : >>> >>> Hi Ming, >>> >>> commit f6537f2f "scripts/kallsyms: filter symbols not in kernel address space", >>> uses CONFIG_PAGE_OFFSET as kernel_start_addr. >>> However, for !CONFIG_MMU case we have : >>> PAGE_OFFSET != CONFIG_PAGE_OFFSET. >> >> Yes, it is the cause, and strictly speaking, commit f6537f2f is wrong, >> but triggered with bogus CONFIG_PAGE_OFFSET if !CONFIG_MMU. >> >> We can fix it either by Rusty's patch or removing the bogus >> CONFIG_PAGE_OFFSET for !CONFIG_MMU. > > Rusty, maybe we need revert commit f6537f2f "scripts/kallsyms: filter > symbols not in kernel address space", since CONFIG_PAGE_OFFSET > may be bogus on !MMU or not defined on ARCHs(most of 64bit arch, > no regression report because scripts/kallsyms may get zero > kernel_start_addr) > For me on Cortex-R7 (nommu) f6537f2f breaks boot (Oops very early on...) and reverting it fixes the problem... However, as you note, we have a 'bogus' CONFIG_PAGE_OFFSET (0xC0000000) for !MMU so another approach would be to fix that... I've tested the patch below and it solves the ARM side of things - so gives you an option other than a complete revert. Happy to put this in to RMK's patch system if you'd prefer not to have to revert and he's happy with the patch. Jonny -------->8----------- diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index d601be3..6756651 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1609,6 +1609,7 @@ endchoice config PAGE_OFFSET hex + default PHYS_OFFSET if !MMU default 0x40000000 if VMSPLIT_1G default 0x80000000 if VMSPLIT_2G default 0xC0000000