Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9930810ybi; Wed, 24 Jul 2019 12:32:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4qxeJhZ0P86ZIrwNR5SZ4xynOs5wSyUOyHhg4zzh8+WSlON5o0CfVDZOoXoKR+w6mmidA X-Received: by 2002:a62:18d4:: with SMTP id 203mr12996998pfy.165.1563996736335; Wed, 24 Jul 2019 12:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563996736; cv=none; d=google.com; s=arc-20160816; b=q/JLg082n0M3NQulIvyMqVBHtp6076eCiiuAva4Ui9bCF9njznzgmuT2s3k99z6srd VIB0wAymgDDhyiwpPIDqHMIzxyLhncvhXC3NTw2CbrUKzqez+ere5bMq2SzsU/IpwYYK ouXuuMc64lDUu5jmPie/Kj20Bq+ChgTVM1CVznUL/hsA5EQibk5JprsrqsC2rx2ILXMO e4oUJrEBSmqgKOPWjsQT+qBd9OBsMVjOd6cnyzTuFUd2E6/NuUlqOr2CF5bd9d9si01A mQi0duk27zpXWudVTVVairDCvokXHET6Jj2b7IgGhnELXBp9XV4pxuLJLJerYLVpLGsE x3Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UVv8l9ZE+UyT0pi+FHBqAoxkxasFHsmSuU2wj9KcY5s=; b=rjpGM4fQBQRZUf6TyrqKwNhT9u1PDbY3aTXY9ouniJeeVLts5/gw+2dkNH2P2B7GCQ GB6kP/a9ZFbu2o20Kq4jb55m+bN2Y+xKa3EOmlR5xPX3xrLeM+zd/8KCGO9QHoqcZ4z3 azozBtW5qPyrRkZIwjKhrSddbgiQF5md9NfMx5Vpp7GTMQSXdgV0ZzmZF+kY9h0dA4dj TgmECNNWn/DEDwkAOeGULokpLGowpM2O337K9hXyg1KHWtBqhdR79KcGz2/eGEjuuNBw fObJw1Zmy0W4hqpTubtkAfbl9skkpM34aEQfwKWVk23eIrfvduTMtAPdtCr+FavQZU9p vSXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="tJwpcc/o"; 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 k186si14707193pgd.229.2019.07.24.12.32.01; Wed, 24 Jul 2019 12:32:16 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b="tJwpcc/o"; 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 S2388339AbfGXT3O (ORCPT + 99 others); Wed, 24 Jul 2019 15:29:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:48212 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387904AbfGXT3M (ORCPT ); Wed, 24 Jul 2019 15:29:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AB3D220659; Wed, 24 Jul 2019 19:29:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996551; bh=w85McdjGw/nENEbAUZ9YDw7pIVL8L+GAmEhcDh89gC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tJwpcc/oKtTv8H130j4CFT+b4ui1ZO6D23Ry5Tm4c8xqI69Hc02aGKb+vL8IWa0sJ nR4YPrkIBai34g0JOivYwDkXxsDBzU1/81JwKHgenIMPrH3Sf0olHZdYeWXSyfuaE6 8/PBkA1TgTDHsVXpCtcHWTIMGoLQZYQcC6OeFGE8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Zyngier , Mark Rutland , James Morse , Will Deacon , Julien Thierry , Catalin Marinas , Sasha Levin Subject: [PATCH 5.2 137/413] arm64: Do not enable IRQs for ct_user_exit Date: Wed, 24 Jul 2019 21:17:08 +0200 Message-Id: <20190724191744.834829288@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 9034f6251572a4744597c51dea5ab73a55f2b938 ] For el0_dbg and el0_error, DAIF bits get explicitly cleared before calling ct_user_exit. When context tracking is disabled, DAIF gets set (almost) immediately after. When context tracking is enabled, among the first things done is disabling IRQs. What is actually needed is: - PSR.D = 0 so the system can be debugged (should be already the case) - PSR.A = 0 so async error can be handled during context tracking Do not clear PSR.I in those two locations. Reviewed-by: Marc Zyngier Acked-by: Mark Rutland Reviewed-by: James Morse Cc: Will Deacon Signed-off-by: Julien Thierry Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin --- arch/arm64/kernel/entry.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 2df8d0a1d980..dbe467686332 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -859,7 +859,7 @@ el0_dbg: mov x1, x25 mov x2, sp bl do_debug_exception - enable_daif + enable_da_f ct_user_exit b ret_to_user el0_inv: @@ -911,7 +911,7 @@ el0_error_naked: enable_dbg mov x0, sp bl do_serror - enable_daif + enable_da_f ct_user_exit b ret_to_user ENDPROC(el0_error) -- 2.20.1