Message ID | 1427219287-21586-1-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDYNJBOFRECBBT6HY2UAKGQE4JPE2IA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F267E214B0 for <linaro@patches.linaro.org>; Tue, 24 Mar 2015 17:50:07 +0000 (UTC) Received: by wivz2 with SMTP id z2sf762966wiv.1 for <linaro@patches.linaro.org>; Tue, 24 Mar 2015 10:50:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=2tIO9LRmitqvWFZzRyZ+o1XGTLjWPqYVGYO5K+Q/3Mw=; b=U9L92u7t9Jg2aFz1A3/+/WvBJHJZdK2lz4uctsuDt5T8ck+uaTzXPwncs5r7nb/Nae gd7mIL9JvSodJ5+z7//4Je1x7l2sy+KU63v0prkf6zLYgmksRl5cDdLU72u/pNi8cyPP ZVPRPRycLa7XZ+gN91P/6UC5V9h7aAz75vIrIq7Lvaj6nZXdeGGqsMLCOFEZY4PhTm1R KG3DlQXb00Sd3aqfUlXJX1iP7VV+7dFYX+I6iU3P2Yo94jB/SUgmFXRGizNF90A2K6TS UjwMCGfr9fZfLnL1e6vAG905qkPcwCPw6qOw+iengWETkleGcRav45cAmxYX+1ryuT/W H+wQ== X-Gm-Message-State: ALoCoQlrTf5FXz9ZsjYK8Egp3jbIX0bgRLLlgGhGbmddbZ2+BA8MUfeLJDNqQPQx1d1gyzOJtwfA X-Received: by 10.180.182.201 with SMTP id eg9mr3362236wic.3.1427219407260; Tue, 24 Mar 2015 10:50:07 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.181.137 with SMTP id dw9ls765790lac.85.gmail; Tue, 24 Mar 2015 10:50:07 -0700 (PDT) X-Received: by 10.152.23.195 with SMTP id o3mr4615621laf.11.1427219407096; Tue, 24 Mar 2015 10:50:07 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id u4si3514559lbz.99.2015.03.24.10.50.07 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2015 10:50:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by laae1 with SMTP id e1so234179laa.2 for <patchwork-forward@linaro.org>; Tue, 24 Mar 2015 10:50:07 -0700 (PDT) X-Received: by 10.112.130.100 with SMTP id od4mr4822588lbb.86.1427219406995; Tue, 24 Mar 2015 10:50:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.57.201 with SMTP id k9csp1603915lbq; Tue, 24 Mar 2015 10:50:06 -0700 (PDT) X-Received: by 10.70.90.133 with SMTP id bw5mr9683871pdb.93.1427219405945; Tue, 24 Mar 2015 10:50:05 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id vm8si6488246pbc.144.2015.03.24.10.50.05 for <patch@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2015 10:50:05 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1YaSwU-0008BV-6b; Tue, 24 Mar 2015 17:48:42 +0000 Received: from mail-wi0-f177.google.com ([209.85.212.177]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YaSwO-0007zl-7n for linux-arm-kernel@lists.infradead.org; Tue, 24 Mar 2015 17:48:37 +0000 Received: by wibgn9 with SMTP id gn9so4529727wib.1 for <linux-arm-kernel@lists.infradead.org>; Tue, 24 Mar 2015 10:48:14 -0700 (PDT) X-Received: by 10.181.9.98 with SMTP id dr2mr30181753wid.62.1427219294011; Tue, 24 Mar 2015 10:48:14 -0700 (PDT) Received: from ards-macbook-pro.local ([90.174.5.112]) by mx.google.com with ESMTPSA id gd6sm16874339wib.17.2015.03.24.10.48.12 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 24 Mar 2015 10:48:13 -0700 (PDT) From: Ard Biesheuvel <ard.biesheuvel@linaro.org> To: linux-arm-kernel@lists.infradead.org, will.deacon@arm.com, christoffer.dall@linaro.org, marc.zyngier@arm.com Subject: [PATCH] ARM: kvm: assert on HYP section boundaries not actual code size Date: Tue, 24 Mar 2015 18:48:07 +0100 Message-Id: <1427219287-21586-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150324_104836_452988_3F489235 X-CRM114-Status: GOOD ( 10.64 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.177 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.177 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 2d760df0d57d..808398ec024e 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -381,5 +381,5 @@ ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined") * and should not cross a page boundary. * The above comment applies as well. */ -ASSERT((__hyp_idmap_text_start & ~PAGE_MASK) + __hyp_idmap_size <= PAGE_SIZE, +ASSERT(__hyp_idmap_text_end - (__hyp_idmap_text_start & PAGE_MASK) <= PAGE_SIZE, "HYP init code too big or misaligned")
Using ASSERT() with an expression that involves a symbol that is only supplied through a PROVIDE() definition in the linker script itself is apparently not supported by some older versions of binutils. So instead, rewrite the expression so that only the section boundaries __hyp_idmap_text_start and __hyp_idmap_text_end are used. Note that this reverts the fix in 06f75a1f6200 ("ARM, arm64: kvm: get rid of the bounce page") for the ASSERT() being triggered erroneously when unrelated linker emitted veneers happen to end up in the HYP idmap region. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- arch/arm/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)