From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86158C76186 for ; Wed, 24 Jul 2019 20:32:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A81B2054F for ; Wed, 24 Jul 2019 20:32:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564000339; bh=w85McdjGw/nENEbAUZ9YDw7pIVL8L+GAmEhcDh89gC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=jdOS0+Bvr0sMy97Ir3hAPKqcan1sySeLtK9RAf5+lWGlcuKRVpf+uo021GuxUnHMX X9h/wDNieGahMKE8dYtZrOOTAlZMjEylBisVNK84Vk/WFb/7T3DaqTRE7nQep9QHqw qsadNt4ybGhTgznxQLUK279Hw3h0eKhzgTuz0rcM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387879AbfGXT3N (ORCPT ); Wed, 24 Jul 2019 15:29:13 -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: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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