From patchwork Fri Oct 23 14:22:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 7473251 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 771E4BEEA4 for ; Fri, 23 Oct 2015 14:24:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AC322207BA for ; Fri, 23 Oct 2015 14:24:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FF8420923 for ; Fri, 23 Oct 2015 14:24:50 +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 1ZpdFA-0005si-6r; Fri, 23 Oct 2015 14:22:56 +0000 Received: from fw-tnat.cambridge.arm.com ([217.140.96.140] helo=cam-smtp0.cambridge.arm.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZpdF7-0005pD-5A for linux-arm-kernel@lists.infradead.org; Fri, 23 Oct 2015 14:22:54 +0000 Received: from mammon-v1.localdomain.localdomain (u201426.usa.arm.com [10.118.28.144]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id t9NEMQws021038; Fri, 23 Oct 2015 15:22:27 +0100 From: Jeremy Linton To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: Align .text section to PAGE_SIZE Date: Fri, 23 Oct 2015 09:22:14 -0500 Message-Id: <1445610134-20528-1-git-send-email-jeremy.linton@arm.com> X-Mailer: git-send-email 2.4.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151023_072253_623283_E4F79033 X-CRM114-Status: UNSURE ( 9.21 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) 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: catalin.marinas@arm.com, suzuki.poulose@arm.com, will.deacon@arm.com, Jeremy Linton , ard.biesheuvel@linaro.org MIME-Version: 1.0 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 It appears that 64k page kernel's die early, in a somewhat random set of locations when built without KVM. Most likely during memblock manipulations (depending on kernel debug options). Normally when KVM is built into the kernel it has an explicit PAGE_SIZE alignment requirement and that forces the text section to be aligned to PAGE_SIZE. Without it, the alignment granularity is likely to be 4k. This updates the linker script to assure that the the text section is aligned to a minimum of PAGE_SIZE regardless of build options. Signed-off-by: Jeremy Linton --- arch/arm64/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index 8a5d97b..bf7b972 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -92,7 +92,7 @@ SECTIONS HEAD_TEXT } ALIGN_DEBUG_RO - .text : { /* Real text segment */ + .text ALIGN(PAGE_SIZE) : { /* Real text segment */ _stext = .; /* Text and read-only data */ __exception_text_start = .; *(.exception.text)