From patchwork Thu Nov 7 23:44:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rusty Russell X-Patchwork-Id: 3154741 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 4A8C09F3C4 for ; Thu, 7 Nov 2013 23:52:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 732FA20383 for ; Thu, 7 Nov 2013 23:52:15 +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 8879220258 for ; Thu, 7 Nov 2013 23:52:14 +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 1VeZMa-0004rl-Be; Thu, 07 Nov 2013 23:51:48 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VeZMN-0006BJ-Np; Thu, 07 Nov 2013 23:51:35 +0000 Received: from ozlabs.org ([2402:b800:7003:1:1::1]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VeZMK-00069C-Ke for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2013 23:51:33 +0000 Received: by ozlabs.org (Postfix, from userid 1011) id 68C452C0092; Fri, 8 Nov 2013 10:51:00 +1100 (EST) From: Rusty Russell To: Axel Lin , Ming Lei Subject: Re: kernel BUG at kernel/kallsyms.c:222! In-Reply-To: References: <1383789208.5970.1.camel@phoenix> User-Agent: Notmuch/0.15.2 (http://notmuchmail.org) Emacs/23.4.1 (i686-pc-linux-gnu) Date: Fri, 08 Nov 2013 10:14:44 +1030 Message-ID: <87zjpf4w0j.fsf@rustcorp.com.au> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131107_185133_249650_5BCEDF2E X-CRM114-Status: GOOD ( 14.32 ) X-Spam-Score: -1.9 (-) Cc: Michal Marek , Russell King , Linux Kernel Mailing List , 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 Axel Lin writes: > 2013/11/7 Ming Lei : >> Hi, >> >> On Thu, Nov 7, 2013 at 10:47 AM, Axel Lin wrote: >>> >>> hi Ming, >>> Seems CONFIG_PAGE_OFFSET is not configurabe in "make menuconfig". >>> And I found CONFIG_PAGE_OFFSET=0xC0000000 for all below configs... >>> $ make at91_dt_defconfig; grep CONFIG_PAGE_OFFSET .config >>> $ make ep93xx_defconfig; grep CONFIG_PAGE_OFFSET .config >>> $ make imx_v4_v5_defconfig; grep CONFIG_PAGE_OFFSET .config >>> $ make mxs_defconfig; grep CONFIG_PAGE_OFFSET .config >>> $ make omap2plus_defconfig; grep CONFIG_PAGE_OFFSET .config >>> $ make s3c6400_defconfig; grep CONFIG_PAGE_OFFSET .config >>> $ make at91x40_defconfig; grep CONFIG_PAGE_OFFSET .config >>> ( at91x40_defconfig is also arm7tdmi ) >> >> Firstly it can be configured via VMSPLIT_3GVMSPLIT_2G/VMSPLIT_1G. >> >> Secondly, configurable or not isn't the point, and maybe some uclinux >> platforms do not use CONFIG_PAGE_OFFSET at all, but they should >> set it as a reasonable value or at least be below than the start link >> address of vmlinux. > > Hi Ming, > > I found in arch/arm/include/asm/memory.h: > CONFIG_PAGE_OFFSET is not used if !CONFIG_MMU. > So looks like setting CONFIG_PAGE_OFFSET to other value still won't work. This seems like the simplest solution, but it may mean you still have crap in /proc/kallsyms. Does it work for you? Thanks, Rusty. diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 32b10f53d0b4..c3bd3efec4cc 100644 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -82,7 +82,9 @@ kallsyms() kallsymopt="${kallsymopt} --all-symbols" fi - kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET" + if [ -n "${CONFIG_MMU}" ]; then + kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET" + fi local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \ ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"