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,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 758E2C76186 for ; Wed, 24 Jul 2019 20:05:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40EBE206BA for ; Wed, 24 Jul 2019 20:05:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563998729; bh=eFNzaiyhmXqseJ76+m91rnHQTlGWu2wv0+eQMEn9XyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=T7Jp1prtxuPxHt8+AyFtrzTAYoA98tuEreVIa1nOIwU8VtJJb4eu34Np2S36ipFCP aG1fSXrX/jrcrTobTS8eHCpN7PVcVksRiZ6eLbecAA6NXhc4UYXnUyIu3TfRb+M/nF hmwijzb7yHPuteF9lQ4GfgDxB2VJbHnez+CivVx8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405787AbfGXUF2 (ORCPT ); Wed, 24 Jul 2019 16:05:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:56744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392663AbfGXUFU (ORCPT ); Wed, 24 Jul 2019 16:05:20 -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 362B7206BA; Wed, 24 Jul 2019 20:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563998719; bh=eFNzaiyhmXqseJ76+m91rnHQTlGWu2wv0+eQMEn9XyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rfpX6Igr3/8bKzFwiOihtV2J2pfnvV9Su/GOSGjU186/8ACzvo213jRz5jNHoFGUj RM3449IBIbloXwY9tEoTJcuIOmXZ27uuyrx8JNHKvZGzrVicgTP0ogRQTIDcsnvVkQ 3XxjRflDU1EAD22B6nypTcuiTpFdMlNjmRw8s+xc= 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 4.19 091/271] arm64: Do not enable IRQs for ct_user_exit Date: Wed, 24 Jul 2019 21:19:20 +0200 Message-Id: <20190724191703.025516001@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191655.268628197@linuxfoundation.org> References: <20190724191655.268628197@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 8556876c9109..5f800384cb9a 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -824,7 +824,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: @@ -876,7 +876,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