Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4490144ybx; Mon, 4 Nov 2019 14:17:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxUmslxC5S9YJaCZhDRoGIx+59eoBCIepMD+EkdkwrNBFlUL+sq8uK9wm9opcruhOLJdRvP X-Received: by 2002:aa7:db82:: with SMTP id u2mr31775244edt.256.1572905829765; Mon, 04 Nov 2019 14:17:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572905829; cv=none; d=google.com; s=arc-20160816; b=JfVJUlhUMNRSbOf8EBbwO/fDtVSgrxG8XoWyCcCdjXTcKw2z3mbP91nKu8c9Psi/hQ iE3Eyj+AbhTgyJcE1e4xxjBRx593ZR5Jo6DVATGQvUjzj/OcnZ8nnLmNYtDFhj+9HuV2 0qyJoG9acNGOVYekRRe+QVa4iAufLvRhxMqGaaRsgpJ2ahkWimjQDO5+z3ko53gtLi9K 8NTcNCF37I6OV5aQIH+BajgE2KOSJ/uhIdtfvqEJMqQn53d/rlQ/eUsUOBROANz+LybC 7+zNuKgi/KR26McqGZ8CZPArOHdi947H8vTS+bEb1Iwh0qRXRHBe8WuRtv2cbm0PKCPU xfpQ== 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=3mEJiEZ6giwEh55w0RAYI5yD9vzXYfHRnVc5wY6CAzk=; b=s4XQTpWXDWFl6DDAfx8lkKEiXwuFQpDVXoDWak49+t9pJAow/YqmeI7Pgx89gT54RE YteN/eKBL+dZpA/Spa8ciqlAeqtE/GOQgpBuBd+3bgkN7iIoqDzLODqG9bexPTxDu4Hx AvUIHO74ilscGi8Y7hfaeTtJyxBciXcojUFP8UQALuZS8yFfRVU+h2SDTaBh0JMIliM7 EqR6VOMl7BvRiUKQTbqRo6U6s6q5MFv473seOztrFvNcJXXqZ4dTRnYZMe8Bxgj+zH5i VO4ylqk6dQfj4rcPSpRCZ1sS/xkyV1AafhREpFBbtB70Nd9Bnf9jxwjym6XjQKKE41fK 6K2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IzUENApH; 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 g31si9294014edg.206.2019.11.04.14.16.46; Mon, 04 Nov 2019 14:17:09 -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; dkim=pass header.i=@kernel.org header.s=default header.b=IzUENApH; 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 S2389797AbfKDWQB (ORCPT + 99 others); Mon, 4 Nov 2019 17:16:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:36202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389781AbfKDWFF (ORCPT ); Mon, 4 Nov 2019 17:05:05 -0500 Received: from localhost (6.204-14-84.ripe.coltfrance.com [84.14.204.6]) (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 AB4C6205C9; Mon, 4 Nov 2019 22:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905105; bh=dZa1QclI7nmvnRW5lxGZ749Hnz0M0rK1zGRq3RTeM6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IzUENApHlTGfHAjbOTw8C6JwbqkWqPmo9NYf7PD3xcizxFG3F+5ThewOfuZJVnix8 DHteIZqKkjOqGTUonw3z48TdRiIo+EJPPBQWh6KOpb3eFFhnlK0saho5fPqKjJo280 jtmCmuf9Ni6cS0Ft1Pa79+TZcuK5Dt/NIbEU9DEM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, James Morse , Julien Thierry , Will Deacon , Sasha Levin Subject: [PATCH 5.3 030/163] arm64: Fix incorrect irqflag restore for priority masking for compat Date: Mon, 4 Nov 2019 22:43:40 +0100 Message-Id: <20191104212142.477442421@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212140.046021995@linuxfoundation.org> References: <20191104212140.046021995@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 From: James Morse [ Upstream commit f46f27a576cc3b1e3d45ea50bc06287aa46b04b2 ] Commit bd82d4bd2188 ("arm64: Fix incorrect irqflag restore for priority masking") added a macro to the entry.S call paths that leave the PSTATE.I bit set. This tells the pPNMI masking logic that interrupts are masked by the CPU, not by the PMR. This value is read back by local_daif_save(). Commit bd82d4bd2188 added this call to el0_svc, as el0_svc_handler is called with interrupts masked. el0_svc_compat was missed, but should be covered in the same way as both of these paths end up in el0_svc_common(), which expects to unmask interrupts. Fixes: bd82d4bd2188 ("arm64: Fix incorrect irqflag restore for priority masking") Signed-off-by: James Morse Cc: Julien Thierry Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/entry.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 109894bd31948..239f6841a7412 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -775,6 +775,7 @@ el0_sync_compat: b.ge el0_dbg b el0_inv el0_svc_compat: + gic_prio_kentry_setup tmp=x1 mov x0, sp bl el0_svc_compat_handler b ret_to_user -- 2.20.1