From patchwork Wed Jan 15 10:26:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11333675 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D1C2A1820 for ; Wed, 15 Jan 2020 10:27:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B82372075B for ; Wed, 15 Jan 2020 10:27:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B82372075B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1irfsy-000313-EH; Wed, 15 Jan 2020 10:26:52 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1irfsx-00030p-D6 for xen-devel@lists.xenproject.org; Wed, 15 Jan 2020 10:26:51 +0000 X-Inumbo-ID: 8a2ac1bc-3781-11ea-8504-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 8a2ac1bc-3781-11ea-8504-12813bfff9fa; Wed, 15 Jan 2020 10:26:50 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 306C6ABF4; Wed, 15 Jan 2020 10:26:49 +0000 (UTC) To: "xen-devel@lists.xenproject.org" From: Jan Beulich Message-ID: <39b51904-37d8-f0c0-2ad3-6a0dd7df59d7@suse.com> Date: Wed, 15 Jan 2020 11:26:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 Content-Language: en-US Subject: [Xen-devel] [PATCH] x86: refine link time stub area related assertion X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" While it has been me to introduce this, the use of | there has become (and perhaps was from the very beginning) misleading. Rather than avoiding the right side of it when linking the xen.efi intermediate file at a different base address, make the expression cope with that case, thus verifying placement on every step. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper as this is simply a --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -351,8 +351,8 @@ SECTIONS .comment 0 : { *(.comment) } } -ASSERT(__image_base__ > XEN_VIRT_START | - __2M_rwdata_end <= XEN_VIRT_END - NR_CPUS * PAGE_SIZE, +ASSERT(__2M_rwdata_end <= XEN_VIRT_END - XEN_VIRT_START + __XEN_VIRT_START - + NR_CPUS * PAGE_SIZE, "Xen image overlaps stubs area") #ifdef CONFIG_KEXEC