From patchwork Mon Oct 26 18:09:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 7491521 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 A2873BEEA4 for ; Mon, 26 Oct 2015 18:11:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE2E0206B8 for ; Mon, 26 Oct 2015 18:11:47 +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 D100D206B6 for ; Mon, 26 Oct 2015 18:11:46 +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 1ZqmDx-0004h4-U7; Mon, 26 Oct 2015 18:10:25 +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 1ZqmDu-0003Mt-5g for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2015 18:10:22 +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 t9QI9qml030921; Mon, 26 Oct 2015 18:09:55 GMT From: Jeremy Linton To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] arm64: Align .text section to PAGE_SIZE Date: Mon, 26 Oct 2015 13:09:49 -0500 Message-Id: <1445882989-10618-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-20151026_111022_599400_89EE9830 X-CRM114-Status: UNSURE ( 9.31 ) 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: suzuki.poulose@arm.com, catalin.marinas@arm.com, ard.biesheuvel@linaro.org, will.deacon@arm.com, Jeremy Linton , laura@labbott.name 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 v2: Use ALIGN_DEBUG_RO_MIN() instead of ALIGN() directly. v1: 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..f3fc966 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -91,7 +91,7 @@ SECTIONS _text = .; HEAD_TEXT } - ALIGN_DEBUG_RO + ALIGN_DEBUG_RO_MIN(PAGE_SIZE) .text : { /* Real text segment */ _stext = .; /* Text and read-only data */ __exception_text_start = .;