From patchwork Thu Feb 4 09:41:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 61169 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp353381lbl; Thu, 4 Feb 2016 01:42:52 -0800 (PST) X-Received: by 10.98.7.219 with SMTP id 88mr9511770pfh.49.1454578972651; Thu, 04 Feb 2016 01:42:52 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id s7si15671796pfi.10.2016.02.04.01.42.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Feb 2016 01:42:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org 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 1aRGPz-00084u-MJ; Thu, 04 Feb 2016 09:41:39 +0000 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aRGPu-00081Q-4g for linux-arm-kernel@lists.infradead.org; Thu, 04 Feb 2016 09:41:36 +0000 Received: by mail-wm0-x22c.google.com with SMTP id l66so17669726wml.0 for ; Thu, 04 Feb 2016 01:41:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=QQ1EMAYtjhV3tFBZDLW/Uos5M8PiIhvD5EwwsXRUFuk=; b=QwfeUJB7wqu4ERO/LHOkDrbt/MeGvGb8Ci3Rp+Z7OLqHeRtE/YspUT9+HZ2z+Ek9v4 HuQVmCCSuGSa1G/oqAFpwqr8wJBLzpInt7l0n3NWSMbVvNUQjcq2fORljNo9NrrqSx1z VphA0p422brxkHNAALJG9Gim5+zcNXJCihWSM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QQ1EMAYtjhV3tFBZDLW/Uos5M8PiIhvD5EwwsXRUFuk=; b=hBy13jV2Gq3CukhhinZtk5ywKOaW6/2DIxI7FArzUri877GhueXSXL08Wwai/2vWUd J49HM0kQvEA5GVCgxIf0TSnVNKizcOcu6pMk1BBIAerEtCfnPIXU2BJGJiIw8RplL2P0 XThVmhqoMncjinLQbBBAmdDcLUIANeOGvsxNOIDNqmUrB9pX3NUCdKvQdKs7GY17acUR WKUvB/VcNlHqgyswJMNGgBQdy0b4vy5izulxy3g+r0k0ZEHEckQixYVdHgSy9bWis41n m8AW36iIAJFa2RXyzOeVYXv7QKUP4agnTi5VbfAtPtAXuTap45fudrBTL3pfa58dEJrR 0NkA== X-Gm-Message-State: AG10YOSMxxkD692e07BqKsch0zsrZKdi4ynaE0bMPvXwwpMgeOxEu2czKA0JtnfjWpq9IoUu X-Received: by 10.28.17.8 with SMTP id 8mr8567450wmr.65.1454578872409; Thu, 04 Feb 2016 01:41:12 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id gg7sm10480993wjd.10.2016.02.04.01.41.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Feb 2016 01:41:11 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, arnd@arndb.de Subject: [PATCH] ARM: hide TCM section markers from kallsyms Date: Thu, 4 Feb 2016 10:41:04 +0100 Message-Id: <1454578864-1136-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160204_014134_578475_38B26B69 X-CRM114-Status: GOOD ( 11.34 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22c listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The new base relative kallsyms implementation that is queued for inclusion in v4.6 assumes that kernel symbols are within 2 GB of each other, and hence splits the 32-bit kallsyms symbol address space into 2 GB of absolute addresses and 2 GB of relative values. This triggers a pathological case on ARM, where, if CONFIG_KALLSYMS_ALL, CONFIG_HAVE_TCM and CONFIG_VMSPLIT_1G are all enabled, the distance between kernel symbols exceeds this 2 GB, and the kallsyms table generation fails. Since both VMSPLIT_1G and HAVE_TCM are niche features, and there is no code in mainline that actually populates the TCM code and data regions, we can work around the issue by hiding the TCM section markers from kallsyms, by emitting them as absolute symbols. Signed-off-by: Ard Biesheuvel --- arch/arm/kernel/vmlinux.lds.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 8b60fde5ce48..931ebd0696ea 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -293,11 +293,11 @@ SECTIONS */ .text_itcm ITCM_OFFSET : AT(__itcm_start) { - __sitcm_text = .; + __sitcm_text = ABSOLUTE(.); *(.tcm.text) *(.tcm.rodata) . = ALIGN(4); - __eitcm_text = .; + __eitcm_text = ABSOLUTE(.); } /* @@ -314,10 +314,10 @@ SECTIONS .data_dtcm DTCM_OFFSET : AT(__dtcm_start) { . = ALIGN(4); - __sdtcm_data = .; + __sdtcm_data = ABSOLUTE(.); *(.tcm.data) . = ALIGN(4); - __edtcm_data = .; + __edtcm_data = ABSOLUTE(.); } /* Reset the dot pointer or the linker gets confused */