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 64FADC76186 for ; Wed, 24 Jul 2019 20:16:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2D87321849 for ; Wed, 24 Jul 2019 20:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563999411; bh=X8ncTH21hc2sPLiUGpphcoGPIk21NMuCZuNeBCj5SKU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cr5jhGjzc8jTiPS0wrI0ze208oakRQMivNRqMExwhdTjGh2vDH/1BBTWw1ElnoyxB rtheJNLj3B/hBQvAEwxL9CJWstLMiQWleL4/PWGXVhpqWSENUZlloCrSZMp0hcKWDU 3EZLXCXJRCOWXxeyjOXhZBISOrZb62iBae7ZoKps= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391416AbfGXTvC (ORCPT ); Wed, 24 Jul 2019 15:51:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:59996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403999AbfGXTu5 (ORCPT ); Wed, 24 Jul 2019 15:50:57 -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 5A59E217D4; Wed, 24 Jul 2019 19:50:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997856; bh=X8ncTH21hc2sPLiUGpphcoGPIk21NMuCZuNeBCj5SKU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nL5nPdQRw9ghQ7L1RNQnfY5Jctq7p6Gz2n9iFibhkrW5naFyNVKq3LLqtGNNSNktW /4WEaG7Z5viLzwcviqXT96s5kThUdf1UlfQ33N+0we47NlaVK57DzvOjVGGq0dT+Pa dH6atzdAy4GwcGzhiMTvhl/Eu37U1oB9yfBSvXHY= 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.1 125/371] arm64: Do not enable IRQs for ct_user_exit Date: Wed, 24 Jul 2019 21:17:57 +0200 Message-Id: <20190724191734.280685361@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191724.382593077@linuxfoundation.org> References: <20190724191724.382593077@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 c50a7a75f2e0..6a3890393963 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -855,7 +855,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: @@ -907,7 +907,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