From patchwork Fri Jan 30 15:34:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 5751871 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CB48F9F38E for ; Fri, 30 Jan 2015 15:36:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EBFAC2024C for ; Fri, 30 Jan 2015 15:36:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4199320160 for ; Fri, 30 Jan 2015 15:36:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YHDay-0008WL-32; Fri, 30 Jan 2015 15:34:56 +0000 Received: from pandora.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YHDau-0008Fv-6M for linux-arm-kernel@lists.infradead.org; Fri, 30 Jan 2015 15:34:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=IoigukQsByrYfUR6LtAl8cg3lU4MSKkCg9xCqhUSstk=; b=Vpdzz+vYQaxy8+TGNpidKpmBrBOP1DwOlPfq4q5D7a4Pb3GPjMypDiz6JcfJtoIJspfA/u0SFl8kZU0J7IBqt52JotMUJIS3qbPSPvtECkMKAJk/Ve842aUkDhipHcUfKbvUMWvRY52XTw7JFCtNlGvPkox1uWcgBMCNmbimOXI=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:55525) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1YHDaR-0003ce-Ou; Fri, 30 Jan 2015 15:34:23 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1YHDaK-0004L3-Rr; Fri, 30 Jan 2015 15:34:17 +0000 Date: Fri, 30 Jan 2015 15:34:14 +0000 From: Russell King - ARM Linux To: Arnd Bergmann , Nicolas Pitre , Ming Lei , Rusty Russell Subject: Re: Continuing kallsyms failures - large kernels, XIP kernels, and large XIP kernels Message-ID: <20150130153414.GM26493@n2100.arm.linux.org.uk> References: <20150130145642.GK26493@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150130145642.GK26493@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150130_073452_556721_65FE907D X-CRM114-Status: GOOD ( 13.67 ) X-Spam-Score: -0.1 (/) Cc: linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Here's a potential patch for issue 2b - to cause the link to fail if the resulting kernel would be broken by trying to run it. arch/arm/kernel/vmlinux.lds.S | 10 ++++++++++ 1 file changed, 10 insertions(+) Acked-by: Nicolas Pitre diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index b31aa73e8076..9351f7fbdfb1 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -351,3 +351,13 @@ ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined") * The above comment applies as well. */ ASSERT(((__hyp_idmap_text_end - __hyp_idmap_text_start) <= PAGE_SIZE), "HYP init code too big") + +#ifdef CONFIG_XIP_KERNEL +/* + * __data_loc is not only the LMA of the data section, but also the VMA of + * the end of the .rodata section. This must not overlap the VMA of the + * data section. Since the .text section starts in module space, and that + * is always below the .data section, this should be sufficient. + */ +ASSERT((_data >= __data_loc), "Text section oversize") +#endif