From patchwork Tue Nov 12 03:22:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 3170541 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8EAB7C045B for ; Tue, 12 Nov 2013 03:23:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9DE662037F for ; Tue, 12 Nov 2013 03:23:26 +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 ADFDD2037A for ; Tue, 12 Nov 2013 03:23:25 +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 1Vg4ZM-0002v7-Mr; Tue, 12 Nov 2013 03:23:12 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vg4ZK-0001WA-DI; Tue, 12 Nov 2013 03:23:10 +0000 Received: from mail-vb0-x234.google.com ([2607:f8b0:400c:c02::234]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vg4ZH-0001VG-Nt for linux-arm-kernel@lists.infradead.org; Tue, 12 Nov 2013 03:23:08 +0000 Received: by mail-vb0-f52.google.com with SMTP id f12so3799932vbg.25 for ; Mon, 11 Nov 2013 19:22:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MI9XPwFPNJDLIkTbyuA/RJmW5/FyQLkcFOT+ruwCYos=; b=ceXAVY96uGG9bvjs1pnB/asJPX9Kbg++Ngs4vapbx8Wb1RjdsxixFTwCmHKEGg5Aq1 lvzY7l39iNmyy3D8h4iRQFR4fDLxgdvJj6gDQ5phgqHlGXtsU4H+0H6M/RRE7nNnFxxv jLtBgRqbGPkkiNLn2ATiy1mw3BbSrRbOvGReacUAiSM8RfsObVb5VFruZVU1NH0yZx/Q rfvEIWepRBdMTbLb13/RkvzcQ3+r6rNwjpgnsh9Hyl6XXpRJv0Cd14MaajEAdKw0VRuD VxMASglg0GW63wx3vO2OEGG3NxMb0oL6I29JUKTqlF+KK5mZK8IYbnRsiEPP6zX3yFkI MgkA== MIME-Version: 1.0 X-Received: by 10.220.144.18 with SMTP id x18mr26906892vcu.15.1384226565274; Mon, 11 Nov 2013 19:22:45 -0800 (PST) Received: by 10.221.65.4 with HTTP; Mon, 11 Nov 2013 19:22:44 -0800 (PST) In-Reply-To: <20131111193236.GB16735@n2100.arm.linux.org.uk> References: <87y54vzszo.fsf@rustcorp.com.au> <528110B1.4060402@arm.com> <20131111193236.GB16735@n2100.arm.linux.org.uk> Date: Tue, 12 Nov 2013 11:22:44 +0800 Message-ID: Subject: Re: kernel BUG at kernel/kallsyms.c:222! From: Ming Lei To: Russell King - ARM Linux X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131111_222307_869973_7F36FB29 X-CRM114-Status: GOOD ( 20.17 ) X-Spam-Score: -2.0 (--) Cc: Michal Marek , Axel Lin , Jonathan Austin , Rusty Russell , Linux Kernel Mailing List , =?ISO-8859-1?Q?Uwe_Kleine=2DK=F6nig?= , 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Tue, Nov 12, 2013 at 3:32 AM, Russell King - ARM Linux wrote: > On Mon, Nov 11, 2013 at 05:15:29PM +0000, Jonathan Austin wrote: >> 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. > > I think this is the right solution because it then means that this symbol > has the same meaning whether on MMU or !MMU - and getting rid of these > kinds of gratuitous variances are the only way that !MMU is going to > become less fragile. The patch only fixes problem on arm, and other !MMU&&!ARM archs should be affected too. Also there is no CONFIG_PAGE_OFFSET defined for some ARCHs, such as 64bit ARCHs. Currently, I suggest to filter only on ARM as attachment patch if we plan to merge Jonathan's patch, otherwise a more complicated approach has to be figured out to do the filter(such as, define a readonly symbol in kernel to store PAGE_OFFSET, and let scripts/kallsyms use it for filtering). Thanks, Signed-off-by: Rusty Russell diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 32b10f5..2dca94a 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_ARM}" ] + kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET" + fi local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL} \ ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"