From patchwork Wed Jan 15 18:43:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 11335555 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 5943113B4 for ; Wed, 15 Jan 2020 18:45:27 +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 3532620728 for ; Wed, 15 Jan 2020 18:45:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="RgFH7E/f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3532620728 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.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 1irne9-0001Nv-GI; Wed, 15 Jan 2020 18:44:05 +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 1irne8-0001No-ES for xen-devel@lists.xenproject.org; Wed, 15 Jan 2020 18:44:04 +0000 X-Inumbo-ID: ff0d5680-37c6-11ea-85e7-12813bfff9fa Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ff0d5680-37c6-11ea-85e7-12813bfff9fa; Wed, 15 Jan 2020 18:44:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1579113841; h=from:to:cc:subject:date:message-id:mime-version; bh=j+Vgup7TUE5JAvNuqV9YyGYViXEb4Evk8gRJBMBVyfk=; b=RgFH7E/fUjWYe276e7ORta2hVjTu2llJu099aHJXj/DuPfPEUDjnyFiX 7s/tT3Ok8jhLYEOVYdR0PKSv/P8xKDi1YxUhbauTgA5+Y2NEiMyvKqz8C 7KMsf3Xa/ZRvW2vRF4HALn6lbZfgagApkZfTkwv4IVRGM1pCYk87QIbw3 w=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: LVfohU+1lebfLGXvanskDlv422PSlTq26MSE+XtDGprmfP/gSdF+816+iW73VXTQk8T6q4bjn/ V/mtpq9KJp84O/HInk9WcorobU4y35zWSutM62yfcHHsSgPOGp1wvTR5aROrA/qTG5ZOAm6byc GfKveJX2JTMZFdU9gcPxiFY+pcwV8xg8envVKCkHG1yslGG+1Mi2qGUWzmz9sX/srmGiJQlUB+ RdbpJzswPOfv2htMRggDXF0tQ/IoZWdg6CZ+oIvAvw2feze0Wmomkubg5zD3YSXg+tqGbJLM1X pCE= X-SBRS: 2.7 X-MesageID: 11555051 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,323,1574139600"; d="scan'208";a="11555051" From: Andrew Cooper To: Xen-devel Date: Wed, 15 Jan 2020 18:43:58 +0000 Message-ID: <20200115184358.21131-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] ARM/boot: Don't poison 'current' during early boot 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 , Stefano Stabellini , Julien Grall , Volodymyr Babchuk Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This logic was inherited from x86 (which was updated several times since). Unlike x86 (at the time) however, while NULL isn't mapped in ARM, 0xfffff000 is, making this actively dangerous. Drop the logic entirely, and leave 'current' as NULL during early boot. Signed-off-by: Andrew Cooper Acked-by: Julien Grall --- CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk --- xen/arch/arm/setup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 3c899cd4a0..9dd3738d44 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -798,9 +798,6 @@ void __init start_xen(unsigned long boot_phys_offset, percpu_init_areas(); set_processor_id(0); /* needed early, for smp_processor_id() */ - set_current((struct vcpu *)0xfffff000); /* debug sanity */ - idle_vcpu[0] = current; - setup_virtual_regions(NULL, NULL); /* Initialize traps early allow us to get backtrace when an error occurred */ init_traps();