Received: by 10.223.185.116 with SMTP id b49csp2263782wrg; Thu, 15 Feb 2018 08:59:06 -0800 (PST) X-Google-Smtp-Source: AH8x224rLjVpjPgYWJ/8q4rhOqXgk+8D8kGGdbsW6za2Mo9okOgsugLYFCdaInIycRmBXTzRIOfT X-Received: by 10.99.96.137 with SMTP id u131mr2777815pgb.103.1518713946589; Thu, 15 Feb 2018 08:59:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518713946; cv=none; d=google.com; s=arc-20160816; b=q2DJ6Tas4B4YeJD+9aEICe3gIrc7f/F9mTzyP7ZOfa10XXwpvgiMhq55gUgBR5vOJV aXpLX6kkIaaYW5CuqoGAmBmysryKzwYamSJQYsq/lgmvdDgme8jznglXES8qi8XtHgc2 /OlN5rNBx2Tgj1kDNfZCyOlK/J7Mo0POC9cbFZZqGrU4o4W+r/CBVBzqbBQkRIRnUePD 8BUsXhduF/oPRVR3jN4VL5vHOohjzZsDsioEFFsZRlA8k3pYNfHvTXK3cEUw+A4GKAxq AXmzd1TM5uzO+P4ojKAQJccvzrbKDt28BAwaMOx8O1+uF6bq8sdTI7uAjkZ8Qrbz68sp c6yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Ss0Qml1xfgkEzItWptyMbyAq4siTFVM/pt42vbLi5DE=; b=DdnEQ4lXX9Ki/25s2LQiKq/bBFsIv3WoqD0OAidT2jHf1/3IDRGVNGMLVjMkeL43/6 mME2OSOvOkIJBuvIyiP3+zbmxaMJLhmmtvZy8V7yflY8M5TbMP3YtKU83i/ncCMIjF5p ANuhKQMH4XLwJ5CapQErREsFxIxk3FEKR2zJUdek0CkJKwCI212WPzK9c34q3tqOJcVe CgQt6A1QDO2kEpC3/HjO0ruAnDUYRSixO683FlnTIT1CJmzI/xSNz4JZM10V8QwrzexZ q7y9ctFdc8i8svEssQU5AdkYnDuJtCE6wNKMWz3S9HWqszqJkIEWiBfGQ6zbACDYbBcv oRfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6-v6si62193plp.101.2018.02.15.08.58.52; Thu, 15 Feb 2018 08:59:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426734AbeBOQ5I (ORCPT + 99 others); Thu, 15 Feb 2018 11:57:08 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:59846 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423556AbeBOPjm (ORCPT ); Thu, 15 Feb 2018 10:39:42 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8293A1135; Thu, 15 Feb 2018 15:39:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Rutland , Laura Abbott , Shanker Donthineni , Will Deacon Subject: [PATCH 4.15 026/202] [Variant 3/Meltdown] arm64: entry: Explicitly pass exception level to kernel_ventry macro Date: Thu, 15 Feb 2018 16:15:26 +0100 Message-Id: <20180215151714.289420306@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151712.768794354@linuxfoundation.org> References: <20180215151712.768794354@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Will Deacon Commit 5b1f7fe41909 upstream. We will need to treat exceptions from EL0 differently in kernel_ventry, so rework the macro to take the exception level as an argument and construct the branch target using that. Reviewed-by: Mark Rutland Tested-by: Laura Abbott Tested-by: Shanker Donthineni Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/entry.S | 50 +++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -71,7 +71,7 @@ #define BAD_FIQ 2 #define BAD_ERROR 3 - .macro kernel_ventry label + .macro kernel_ventry, el, label, regsize = 64 .align 7 sub sp, sp, #S_FRAME_SIZE #ifdef CONFIG_VMAP_STACK @@ -84,7 +84,7 @@ tbnz x0, #THREAD_SHIFT, 0f sub x0, sp, x0 // x0'' = sp' - x0' = (sp + x0) - sp = x0 sub sp, sp, x0 // sp'' = sp' - x0 = (sp + x0) - x0 = sp - b \label + b el\()\el\()_\label 0: /* @@ -116,7 +116,7 @@ sub sp, sp, x0 mrs x0, tpidrro_el0 #endif - b \label + b el\()\el\()_\label .endm .macro kernel_entry, el, regsize = 64 @@ -369,31 +369,31 @@ tsk .req x28 // current thread_info .align 11 ENTRY(vectors) - kernel_ventry el1_sync_invalid // Synchronous EL1t - kernel_ventry el1_irq_invalid // IRQ EL1t - kernel_ventry el1_fiq_invalid // FIQ EL1t - kernel_ventry el1_error_invalid // Error EL1t - - kernel_ventry el1_sync // Synchronous EL1h - kernel_ventry el1_irq // IRQ EL1h - kernel_ventry el1_fiq_invalid // FIQ EL1h - kernel_ventry el1_error // Error EL1h - - kernel_ventry el0_sync // Synchronous 64-bit EL0 - kernel_ventry el0_irq // IRQ 64-bit EL0 - kernel_ventry el0_fiq_invalid // FIQ 64-bit EL0 - kernel_ventry el0_error // Error 64-bit EL0 + kernel_ventry 1, sync_invalid // Synchronous EL1t + kernel_ventry 1, irq_invalid // IRQ EL1t + kernel_ventry 1, fiq_invalid // FIQ EL1t + kernel_ventry 1, error_invalid // Error EL1t + + kernel_ventry 1, sync // Synchronous EL1h + kernel_ventry 1, irq // IRQ EL1h + kernel_ventry 1, fiq_invalid // FIQ EL1h + kernel_ventry 1, error // Error EL1h + + kernel_ventry 0, sync // Synchronous 64-bit EL0 + kernel_ventry 0, irq // IRQ 64-bit EL0 + kernel_ventry 0, fiq_invalid // FIQ 64-bit EL0 + kernel_ventry 0, error // Error 64-bit EL0 #ifdef CONFIG_COMPAT - kernel_ventry el0_sync_compat // Synchronous 32-bit EL0 - kernel_ventry el0_irq_compat // IRQ 32-bit EL0 - kernel_ventry el0_fiq_invalid_compat // FIQ 32-bit EL0 - kernel_ventry el0_error_compat // Error 32-bit EL0 + kernel_ventry 0, sync_compat, 32 // Synchronous 32-bit EL0 + kernel_ventry 0, irq_compat, 32 // IRQ 32-bit EL0 + kernel_ventry 0, fiq_invalid_compat, 32 // FIQ 32-bit EL0 + kernel_ventry 0, error_compat, 32 // Error 32-bit EL0 #else - kernel_ventry el0_sync_invalid // Synchronous 32-bit EL0 - kernel_ventry el0_irq_invalid // IRQ 32-bit EL0 - kernel_ventry el0_fiq_invalid // FIQ 32-bit EL0 - kernel_ventry el0_error_invalid // Error 32-bit EL0 + kernel_ventry 0, sync_invalid, 32 // Synchronous 32-bit EL0 + kernel_ventry 0, irq_invalid, 32 // IRQ 32-bit EL0 + kernel_ventry 0, fiq_invalid, 32 // FIQ 32-bit EL0 + kernel_ventry 0, error_invalid, 32 // Error 32-bit EL0 #endif END(vectors)